You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a=1classMyClass:
copyA=a# this should refer to global adeffoo():
self.a=2
Because currently the PythonAddDeclarationPass is executed before the symbol resolver, it will "correctly" create a new dynamic field a in my class. Therefore, the symbol resolver will "correctly" resolve the reference a in the static class context to the field a. However, in reality, the static context is executed when the class definition is created and the resolution should go to the global a.
This is not easily fixable, unless we merge the PythonAddDeclarationPass into the symbol resolver and then try to resolve in EOG-like order (static class context, then methods) and create dynamic fields on the fly.
The text was updated successfully, but these errors were encountered:
Consider the following snipped:
Because currently the
PythonAddDeclarationPass
is executed before the symbol resolver, it will "correctly" create a new dynamic fielda
in my class. Therefore, the symbol resolver will "correctly" resolve the referencea
in the static class context to the field a. However, in reality, the static context is executed when the class definition is created and the resolution should go to the globala
.This is not easily fixable, unless we merge the
PythonAddDeclarationPass
into the symbol resolver and then try to resolve in EOG-like order (static class context, then methods) and create dynamic fields on the fly.The text was updated successfully, but these errors were encountered: