we've troubleshoot some of our ported code today and found out we had an ambiguous variable access between a local access and a global define.
The Global define is not even part of the current project but from another projected referenced in the solution
We've disabled the implicit namespace compiler option.
here are the culprits :
in project1.class1
Code: Select all
CLASS LocDetArray
ACCESS STATUT_CTRL()
RETURN ( SELF:FIELDGET( #STATUT ) = STATUT_CTRL )
END CLASS
Code: Select all
DEFINE STATUT_CTRL := "4"
So now we prefix the LocFacComLib.Functions.STATUT_CTRL to get the global define to lift the ambiguity.
How could we further prevent this ?
Can't the compiler warn us, like it does for other ambigous calls ?
Regards.