I've been following the JetBrains MPS Shapes tutorial: https://confluence.jetbrains.com/display/MPSD32/Shapes+-+an+introductory+MPS+tutorial
In the tutorial section "A more robust generation for Squares" there is the following definition:
template reduce_Square
input Square
parameters
<< ... >>
content node:
{
Graphics g = null;
<TF {
->$g.setColor(Color.->$red);
->$g.drawRect($10, $10, $10, $10);
} TF>
}
And the reference macro for g (which you can see in the Inspector part of the editor if you put the cursor at ->$g) is:
(outputNode, genContext, operationContext, node)->join(node<VariableDeclaration> | string) {
genContext.get output graphicParam for (node.parent : Canvas);
}
Yet when trying to rebuild the "Shapes" language I get the following error message (4 times, twice for each ->$g):
type node<> is not a subtype of node<VariableDeclaration>