-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
Parsing exception while using 'as' operator #287
Comments
I think we don't support dynamic casts yet (the |
We have the exact issue since upgrading to a newer version. Expressions which worked before, now break. |
It could be a regression. could you help us by telling us from which version it stopped working? |
Before: 2.8.1.0 Test for As_Operator: |
Manual bisect:
#178 seems to be to blame |
@IAMJDA thanks for narrowing it down! It's indeed a regression in the way the types are parsed: we don't reset the parser position properly if the type has no modifier. I'll need to ensure it's working for all the possible type modifiers. For example: string?
string?[]
string?[][]
IEnumerable<string>
IEnumerable<string?[]>?[] but it shouldn't take too long 🤞 |
I'm trying to use following expression:
string.IsNullOrEmpty(variable as string)
but it results with exception: DynamicExpresso.Exceptions.ParseException: ')' or ',' expected (at index 40).
Adding extra parenthesis as message suggests solves the issue, but the expression is obviously wrong then
string.IsNullOrEmpty(variable as string))
Seems there is something wrong with parser.
The text was updated successfully, but these errors were encountered: