Inherited equation for NTA child

Create issue
Issue #79 resolved
Jesper Öqvist created an issue

Click here to view original trac ticket.

It is not possible to declare an equation for an inherited attribute on an NTA child if the NTA is declared as a pure attribute.


aspect Test {
  syn nta B A.b() = new B();
  inh int B.value();
  eq A.b().value() = -1;

JastAdd reports:

Error at Test.jrag:3: inherited attribute value defined on root node B

Comments (5)

  1. Niklas Fors

    Is this an error?

    "syn B A.b() = new B();" declares a reference attribute, not an NTA.

    For this simple example, it would be possible to infer that b() should be an NTA, due to the new statement. But this is not possible in the general case.

  2. Log in to comment