Skip to content
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

The expression of "1 == 2 ? Random.Range(0, 1) : 3" results in a parser exception #4

Closed
zzxiang opened this issue May 14, 2018 · 3 comments
Labels

Comments

@zzxiang
Copy link

zzxiang commented May 14, 2018

The expression is:

1 == 2 ? Random.Range(0, 1) : 3

The following exception is reported:

ExpressionParserException: A colon ':' symbol is expected in conditional '?' expression.

Changing Random.Range(0, 1) to Random.value makes the exception disappear.

However, 1 == 2 ? 3 : Random.Range(0, 1) can be correctly parsed.

@deniszykov
Copy link
Owner

Hi! Thanks for report. I will look what is wrong with parser.

@deniszykov
Copy link
Owner

I have fixed this issue in 09eec9f commit. You could take new dll here.

@deniszykov deniszykov added the bug label May 15, 2018
@zzxiang
Copy link
Author

zzxiang commented May 15, 2018

Yes! It does work now! Thank you very much for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants