rascal icon indicating copy to clipboard operation
rascal copied to clipboard

Except uses of constructors have no use/def entry in TModel

Open toinehartman opened this issue 8 months ago • 1 comments

Describe the bug

Except uses of constructors have no use/def entry in TModel.

To Reproduce

void exceptConstructor() {
    println("= Except constructors=");
    tm = typeCheck(
        "syntax S
        '   = foo: \"foo\"
        '   | bar: \"bar\"
        '   | baz: S!foo
        '   ;"
    );

    defs = {d | Define d:<_, "foo", _, _, _, _> <- tm.defines};
    print("Defs of \'foo\': ");
    iprintln(defs);

    // No uses at !except
    print("Uses: ");
    iprintln(invert(tm.useDef)[defs.defined]);

    println("======================");
}

Expected behavior A use/def entry at the last occurrence of foo.

toinehartman avatar Mar 12 '25 13:03 toinehartman