Do not generate set methods for NTA children

Issue #200 resolved
Jesper Öqvist created an issue

It should not be possible to set a value for an NTA child. For example:

syn nta Opt<B> A.getBOpt() = new Opt();

...

A a = new A();
a.setBOpt(new Opt<B>(new B()));

The setBOpt method in the above example should not be generated. Instead the developer can write:

a.setB(new B());

This is both safer and more concise.

Comments (2)

  1. Jesper Öqvist reporter

    Using the setters for NTA children is unsafe because NTAs are treated as regular attributes and can be flushed.

  2. Log in to comment