rascal icon indicating copy to clipboard operation
rascal copied to clipboard

can not match against builtin type() constructor

Open jurgenvinju opened this issue 4 years ago • 0 comments
trafficstars

Describe the bug

data X = x();

if (type(Symbol s, map[Symbol, Production] g) := #X) {
  println("<s> is defined in <g>");
}

This does not match or print anything, but it should simply match the type constructor that is produced by #X against the pattern and bind the symbol and the grammar.

Apparently there is a test missing for this as well.

jurgenvinju avatar Jun 04 '21 08:06 jurgenvinju