rascal
rascal copied to clipboard
Unexplained ambiguity in string interpolation as a first declaration in a functiojn
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.