Closed a2aaron closed 3 years ago
Thanks for bringing this up. Seems like empty blocks trip up the optimizer.
The Playground is based on 0.20.1
. I believe the bug was introduced after that version. In the meantime you can try pulling 0.20.1
...
This is now fixed: https://github.com/rhaiscript/rhai/pull/422
You can try pulling it and test.
Thank you so much! That PR seemed to fix it!
When I compile a Rhai script that has a function containing
return;
, the engine will seemingly compile the script forever.When this program is run, only
Compiling script...
appears. No further progress is made. Note that this doesn't always happen for some reason. For example, the following Rhai script compiles successfully.But this locks up:
For some reason, I can't replicate this behavior on https://rhai.rs/playground/stable/, all of the scripts shown above compile successfully.
Note that I am using version 0.20.3 of the crate.