Advertisement

Compiler crash with ?: operator

Started by April 25, 2018 12:27 PM
4 comments, last by WitchLord 6 years, 6 months 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?

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

Advertisement

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