🎉 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!

Assertion failure when missing parens while assigning a handle in a loop condition

Started by
2 comments, last by WitchLord 7 months, 3 weeks ago

This throws the below assertion error:

    string[]@ arr;
    while (false && (@arr = cast<array<string>>(null) !is null)) {
        break;
    }

which can be avoided/fixed by adding parens around the assignment like so:

    string[]@ arr;
    while (false && ((@arr = cast<array<string>>(null)) !is null)) {
        break;
    }

originally reported on openplanet github: https://github.com/openplanet-nl/issues/issues/385

Advertisement

Thanks, I'll investigate and fix this

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

I've fixed this in rev 2868.

Regards,
Andreas

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