There was a incorrect call to setParent with a null argument, causing an AnnotatedTypeExpression to become "orphaned" and causing an NPE during the compilation.
For short-hand class declarations, we create a synthetic PropertyDeclarationStatement and used to simply ask it to create corresponding structures (properties). The problem with this approach was that the newly created PDS was immediately "orphaned" and therefore never validated properly. The change in TypeCompositionStatement.java adds it to the statement body and catches up to the current (Registered) stage, which does everything it used to do plus allowing the validation logic to be performed on it at during the validation phase.
The compiler fix revealed an incorrect class declaration in TxManager.x. The Requirement const used to be declared as static, but it refers to DBObjectImpl, which is a typedef that depends on the formal type parameter Schema, which is not avaliable outside of the TxManager context.
There are three different fixes in this change:
There was a incorrect call to
setParent
with anull
argument, causing an AnnotatedTypeExpression to become "orphaned" and causing an NPE during the compilation.For short-hand class declarations, we create a synthetic PropertyDeclarationStatement and used to simply ask it to create corresponding structures (properties). The problem with this approach was that the newly created PDS was immediately "orphaned" and therefore never validated properly. The change in TypeCompositionStatement.java adds it to the statement body and catches up to the current (Registered) stage, which does everything it used to do plus allowing the validation logic to be performed on it at during the validation phase.
The compiler fix revealed an incorrect class declaration in TxManager.x. The
Requirement
const used to be declared asstatic
, but it refers toDBObjectImpl
, which is a typedef that depends on the formal type parameterSchema
, which is not avaliable outside of the TxManager context.