summaryrefslogtreecommitdiff
path: root/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java')
-rw-r--r--python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java b/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java
index bd33be42b4af..781dc28c0d35 100644
--- a/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java
+++ b/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java
@@ -43,6 +43,7 @@ public class PyCallExpressionHelper {
}
/**
+ * TODO: Copy/Paste with {@link com.jetbrains.python.psi.PyArgumentList#addArgument(com.jetbrains.python.psi.PyExpression)}
* Adds an argument to the end of argument list.
* @param us the arg list
* @param expression what to add
@@ -507,7 +508,9 @@ public class PyCallExpressionHelper {
}
}
}
- else if (((PyFile)call.getContainingFile()).getLanguageLevel().isPy3K() && containingClass != null) {
+ else if ((call.getContainingFile() instanceof PyFile) &&
+ ((PyFile)call.getContainingFile()).getLanguageLevel().isPy3K() &&
+ (containingClass != null)) {
return new Maybe<PyType>(getSuperClassUnionType(containingClass));
}
}