Allow stub->AST in TypeEvalContext only if explicitly allowed or in the origin file

This commit is contained in:
Andrey Vlasovskikh
2013-08-14 17:41:21 +04:00
parent 4121323fe7
commit be280d0e04
@@ -159,7 +159,7 @@ public class TypeEvalContext {
}
public boolean maySwitchToAST(@NotNull StubBasedPsiElement element) {
return myAllowStubToAST || (element.getStub() == null && (myOrigin == null || myOrigin == element.getContainingFile()));
return myAllowStubToAST || myOrigin == element.getContainingFile();
}
@Nullable