Merge branch 'master' of git+ssh://github.com/JetBrains/kotlin

This commit is contained in:
Evgeny Goldin
2012-02-20 18:22:32 +02:00
2 changed files with 14 additions and 1 deletions
@@ -611,7 +611,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
checkSuper(receiver, resultingDescriptor, context.trace, selectorExpression);
return resultingDescriptor.getOutType();
}
if (resolutionResult.isAmbiguity()) {
if (resolutionResult.isAmbiguity() || resolutionResult.singleResult()) {
temporaryTrace.commit();
return null;
}
@@ -0,0 +1,13 @@
//KT-1270 Poor highlighting when trying to dereference a nullable reference
//+JDK
package kt1270
fun foo() {
val sc = java.util.HashMap<String, SomeClass>()[""]
val <!UNUSED_VARIABLE!>value<!> = sc<!UNSAFE_CALL!>.<!>value
}
private class SomeClass() {
val value : Int = 5
}