taxi-lang issueshttps://gitlab.com/taxi-lang/taxi-lang/-/issues2024-02-14T15:06:26Zhttps://gitlab.com/taxi-lang/taxi-lang/-/issues/56Can't use a parameter as the input to an expression2024-02-14T15:06:26ZMarty PittCan't use a parameter as the input to an expressionThis fails to compile:
```
service PeopleService {
operation findPeople(
currentTime : Instant = now(),
@HttpHeader(name = "If-Modified-Since") ifModifiedSince : Instant = addDays(curre...This fails to compile:
```
service PeopleService {
operation findPeople(
currentTime : Instant = now(),
@HttpHeader(name = "If-Modified-Since") ifModifiedSince : Instant = addDays(currentTime, -1)
):Person[]
}
```
Note that `addDays(currentTime)` references a value from within the inputs. This should be valid
Here's a failing test, stashed from `OperationSpec`:
```kotlin
it("can use other parameters as inputs to an expression") {
""" model Person {
name : Name inherits String
}
service PeopleService {
operation findPeople(
currentTime : Instant = now(),
@HttpHeader(name = "If-Modified-Since") ifModifiedSince : Instant = addDays(currentTime, -1)
):Person[]
}""".compiled()
}
```