diff --git a/python/src/com/jetbrains/python/psi/impl/references/PyReferenceImpl.java b/python/src/com/jetbrains/python/psi/impl/references/PyReferenceImpl.java index a68d688047f5..2cb1e79ce8b7 100644 --- a/python/src/com/jetbrains/python/psi/impl/references/PyReferenceImpl.java +++ b/python/src/com/jetbrains/python/psi/impl/references/PyReferenceImpl.java @@ -448,7 +448,7 @@ public class PyReferenceImpl implements PsiReferenceEx, PsiPolyVariantReference // we shadow their name or they shadow ours (PY-6241) if (resolveResult instanceof PsiNamedElement && resolveResult instanceof ScopeOwner && element instanceof ScopeOwner && - ourScopeOwner == ScopeUtil.getScopeOwner(resolveResult)) { + theirScopeOwner == ScopeUtil.getScopeOwner(resolveResult)) { return true; }