travisdoor/bl

Invalid replacement of nested polymorph.

Closed this issue · 0 comments

Nested polymorph function has its polymorph arguments replaced implicitly by s32 because it detects active polymorph replacement during generation, but the polymorph queue is empty.

foo :: fn (outer: ?T) {
    bar :: fn (inner: ?T) {
        print("bar = %\n", inner);
    };
    
    print("foo = %\n", outer);
    bar(true);
}

main :: fn () s32 {
    foo(10);
}