Allow UseModule to export inherited idententifiers
Posted: Tue Oct 01, 2019 2:26 am
Allow UseModule in DeclareModule to export inherited identifiers.
For example:
This results in the following error:
This duplicates code and is error prone due to tight coupling.
Note that this is scoped in DeclareModule which is public. The same behavior would not occur for UseModule on a Module block which is private.
For example:
Code: Select all
DeclareModule Triangle
#Triangle=1
EndDeclareModule
Module Triangle
EndModule
DeclareModule Square
#Square=2
EndDeclareModule
Module Square
EndModule
DeclareModule Pentagon
#Pentagon=3
EndDeclareModule
Module Pentagon
EndModule
DeclareModule Shapes
UseModule Triangle
UseModule Square
UseModule Pentagon
EndDeclareModule
Module Shapes
EndModule
Debug Shapes::#Triangle
To work around this we have to do this:Constant not found: #Triangle.
Code: Select all
DeclareModule Shapes
#Triangle=Triangle::#Triangle
EndDeclareModule
Note that this is scoped in DeclareModule which is public. The same behavior would not occur for UseModule on a Module block which is private.