Do not generate set methods for NTA children
Issue #200
resolved
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)
-
reporter -
reporter - changed status to resolved
Do not generate NTA setters methods
NTA values should only be computed using the corresponding NTA equation.
fixes
#200(bitbucket)→ <<cset d8e85953e635>>
- Log in to comment
Using the setters for NTA children is unsafe because NTAs are treated as regular attributes and can be flushed.