-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
instance of doesn't work for durations #155
Comments
Debugging the interpreter, it seems that the interpreter is expecting:
However, the Just changing the expected type to Also, the |
@daniel-shuy thank you for having a look 👍
Yes. We need to tweak the parser a bit to accept "years and months duration" and "days and time duration" as type names.
I guess that you mean that it returns |
id like to give this a try. |
Is this link still the correct link https://github.com/camunda/feel-scala/blob/master/src/main/scala/org/camunda/feel/impl/parser/FeelParser.scala#L357-L363 |
Is there more that needs to be done because when I do that I get
https://github.com/camunda/feel-scala/compare/main...sccalabr:feel-scala:155?expand=1 |
@sccalabr I see. Let me revert my previous comment. 😅 Instead, we need to adjust the function typeName() that is used by the |
adjust the function how? the names map to identifier | escapedIdentifier do we consider those strings to be reserved words now? |
@sccalabr you could extend the For example:
The types are no reserved words but need to be handled explicitly because of the whitespaces. |
How would instance of know that duration is of those types though? I would have thought the exp class would have made it work but that doesnt seem to be the case. Here is the pr I have so its easier to see #535 |
@sccalabr the PR looks good so far. 👍 In order to pass the test, you need to adjust the function |
Describe the bug
I can not check the type of a duration value using
instance of
.To Reproduce
Expression
null instance of years and months duration
produces a failure but should returnfalse
Expected behavior
Environment
The text was updated successfully, but these errors were encountered: