Regression: getPredictableNullability for unnecessary safe call check #KT-10276 Fixed
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user