- changed status to resolved
Inherited attribute declarations not found for List or Opt
Issue #188
resolved
When an inherited attribute is declared on List or Opt, JastAdd does not find the declaration and prints a stack trace:
X ::= X*;
Y: X;
aspect Test {
inh boolean List.childOfY();
eq X.getChild().childOfY() = false;
eq Y.getChild().childOfY() = true;
}
[junit] Exception in thread "main" java.lang.Error: tests/inh/lookup_decl_01p/Test.jrag:3 could not find decl for AttrEq childOfY in X
[junit] at org.jastadd.ast.AST.AttrEq.type(Unknown Source)
[junit] at org.jastadd.ast.AST.TypeDecl.inhEqMap_compute(Unknown Source)
[junit] at org.jastadd.ast.AST.TypeDecl.inhEqMap(Unknown Source)
[junit] at org.jastadd.ast.AST.Grammar.inhEqMap_compute(Unknown Source)
[junit] at org.jastadd.ast.AST.Grammar.inhEqMap(Unknown Source)
[junit] at org.jastadd.ast.AST.ASTDecl.emitInhEqSignatures(Unknown Source)
[junit] at org.jastadd.ast.AST.ASTDecl.jastAddAttributes(Unknown Source)
[junit] at org.jastadd.ast.AST.ASTDecl.jastAddGen(Unknown Source)
[junit] at org.jastadd.ast.AST.Grammar.jastAddGen(Unknown Source)
[junit] at org.jastadd.JastAdd.compile(Unknown Source)
[junit] at org.jastadd.JastAdd.compile(Unknown Source)
[junit] at org.jastadd.JastAdd.main(Unknown Source)
Comments (2)
-
reporter -
reporter - changed component to analysis
- Log in to comment
Allow sole inh attr decls on List/Opt
Simplified inherited attribute declaration lookup.
fixes issue
#188(bitbucket)→ <<cset fa7e92c8e590>>