Fixed UnsupportedOperationException when a namespace is used in place of an expression.
This commit is contained in:
committed by
Alexander Udalov
parent
54e5b6d476
commit
2f47e30a1a
+3
@@ -841,6 +841,9 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
JetType type = getVariableType(nameExpression, receiver, callOperationNode, context.replaceBindingTrace(traceForVariable), result);
|
||||
if (result[0]) {
|
||||
traceForVariable.commit();
|
||||
if (type instanceof NamespaceType && !context.namespacesAllowed) {
|
||||
type = null;
|
||||
}
|
||||
return JetTypeInfo.create(type, context.dataFlowInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user