When creating conditions for attributes in patterns that refine another pattern, only the attributes of the object type specified in the parent pattern can be used for comparisons.
Example:
In the SokobanLanguage, add an attribute to Blocks:
class Block extends Boulder {
attr EInt [1] type;
}
In the BoardPatterns.gt, add a pattern containing two Boulders:
In Boardpatterns.gt in the pattern twoBlocks, the second occurrence of type in the line .type == fig.type is marked with Could not find attribute 'type'..
Thanks @FabianMarcoBauer This is probably a bug in the scope provider for gt files. I guess the candidates for referenced attributes do not take refinements into account.
When creating conditions for attributes in patterns that refine another pattern, only the attributes of the object type specified in the parent pattern can be used for comparisons.
Example:
In the BoardPatterns.gt, add a pattern containing two Boulders:
In the BoardPatterns.gt, add a second pattern refining the previously created pattern, which tries to compare their attributes:
.type == fig.type
is marked withCould not find attribute 'type'.
.