Files
openide/python/testData/resolve/NestedClassResolvedInsideAnnotationOfNewStyleGenericMethod.py
Mikhail Golubev 98016a1ae6 PY-63367 PY-63366 Include instructions for annotations of new-styles generic functions in their own CFG
This way they have access to type parameters of these functions, and PyReferenceImpl.getResultsFromProcessor
can properly perform flow-sensitive resolve for them now that READ instructions for expressions
inside annotations and WRITE instructions for type parameters are in the same CFG. It allowed to
remove all the special logic for type parameters from PyReferenceImpl as well as from
PyUnboundLocalVariableInspection.

I had to special-case these annotations in PyResolveUtil.scopeCrawlUp, though, to "lift" their
original scope back from what ScopeUtil.getScopeOwner returns, making names defined in a class scope,
e.g., nested classes, visible to them.

GitOrigin-RevId: b2e78211565300dbcd7c2e2b246a7a8e14bb0e8f
2023-10-16 23:42:44 +00:00

128 B