Advertisement

4 assertion errors with nested lists of handles

Started by March 11, 2024 10:28 PM
4 comments, last by xertrov 9 months, 2 weeks ago

The following code produces 4 different assertions upon compilation (the first 4 times, then the next 3).
It's probably not as minimal as it could be.
Angelscript 2.37.0 WIP via Openplanet 1.26.16
Images of the assertion errors can be found here: https://github.com/openplanet-nl/issues/issues/442

class Cache {
    Cache() {
    }

    protected Obj@[]@[] _Blah;
    const Obj@[]@[] get_Blah() {
        return _Blah;
    }

    protected void AddObj(Obj@ o) {
        while (o.pos.x >= _Blah.Length) {
            _Blah.InsertLast({});
            break;
        }
        _Blah[o.pos.x].InsertLast(o);
    }
}


class Obj {
    nat3 pos;
    Obj(nat3 pos) {
        this.pos = pos;
    }
}


If I replace Obj@[]@[] with Obj@[][] the exceptions don't happen.

Advertisement

Thanks. I'll investigate and have this 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

I've fixed this in revision 2902.

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

Thanks!

This topic is closed to new replies.

Advertisement