Advertisement

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

Started by October 12, 2023 03:07 AM
2 comments, last by WitchLord 1 year, 2 months 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

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

Advertisement

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