rascal icon indicating copy to clipboard operation
rascal copied to clipboard

Unexplained ambiguity in string interpolation as a first declaration in a functiojn

Open jurgenvinju opened this issue 2 years ago • 0 comments

Describe the bug

This is not ambiguous:

str treeAsMessage(Tree t) {
    str msg = "" + "<t>"; // workaround funny ambiguity
   
    return msg;
}

This is:

str treeAsMessage(Tree t) {
    str msg = "<t>"; // workaround funny ambiguity
   
    return msg;
}

It seems the entire function body is part of the ambiguity since the str return type is not highlighted in the ambiguous case.

This is code in analysis::typepal::Collector in case more context is needed to debug this issue.

jurgenvinju avatar Mar 21 '23 09:03 jurgenvinju