[Expression] TDefinedType should contain a reference to its TypeDefinition
Right now the usage of a type and its definition are completely
disconnected.
The only way to find the definition of a given type is to look it up in
the data dictionary, by name.
This is programmatically extremely annoying, forces to bring a “context” object around and yields many bugs.
A solution would be to simply add, in the TDefinedType an attribute
refering to the TypeDefinition.
This entails many changes though.
(from redmine: issue id 2301, created on 2015-02-20, closed on 2017-01-30)