rascal
rascal copied to clipboard
false "Undefined" message from type checker for variable introduced in concrete syntax pattern in comprehension.
Describe the bug
rel[str from, str to] edges = {<"<from>", "<to>"> | /(Edge) `<Node from> -- <Node to>` := g}
This gets an Undefined from and Undefined to from the type-checker.
module Syntax
start syntax Graph = "graph" Node+ top "{" Edge* edges "}";
syntax Edge = Node from "--" Node to;
layout Whitespace = [\ \t\n\r]*;
lexical Node = [$A-Za-z0-9\-]+;
Thanks for reporting. Apart from the fact that the variable g is undefined in the given code snippets, the undefined messages are gone now.