Regression: getPredictableNullability for unnecessary safe call check #KT-10276 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-12-08 10:04:37 +03:00
parent 2330ce2c28
commit 57b3bc0496
4 changed files with 28 additions and 1 deletions
@@ -0,0 +1,11 @@
// See KT-10276
class Bar() {
var test: String? = null
fun foo() {
if (test != null) {
// No warning: test is a mutable property
test?.hashCode()
}
}
}
@@ -0,0 +1,10 @@
package
public final class Bar {
public constructor Bar()
public final var test: kotlin.String?
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}