🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Compiler crash with ?: operator

Started by
4 comments, last by WitchLord 6 years, 1 month ago

The following code crashes the Angelscript compiler on 2.32.0:


array<int> foo = true ? { 1, 2, 3 } : { 4, 5, 6 };

Edit: The changelist for the WIP version actually says:

Quote

Compiler would crash on compiling ternary operator with anonymous list in one of the conditions (Thanks doctorgester)

Is this the same thing?

Advertisement

Yes, I believe it is the same bug. Still, I'll give it a try before closing this as fixed.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Indeed. It is the same, the script doesn`t cause any crash in the WIP version. 

It will still produce a compiler error though: "Unable to resolve auto type". 

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Thanks for checking! Will this ever be working in the future, or is it not possible to make this work?

It's possible to implement, but it isn't a trivial solution and would require quite a bit of change.

Maybe some day, but it is definitely not something I'll prioritize at this moment.

 

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement