[FIR] Ignore smartcast for non-final members from Java, ^KT-50219 Fixed
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
// FIR_IDENTICAL
|
||||
// KT-50219
|
||||
|
||||
// FILE: Base.java
|
||||
public class Base {
|
||||
protected String field;
|
||||
protected final String finalField = "finalFieldValue";
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
class Derived : Base() {
|
||||
fun foo() {
|
||||
if (field == null) {
|
||||
field.length
|
||||
}
|
||||
|
||||
if (finalField == null) {
|
||||
finalField<!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package
|
||||
|
||||
public open class Base {
|
||||
public constructor Base()
|
||||
protected/*protected and package*/ final var field: kotlin.String!
|
||||
protected/*protected and package*/ final val finalField: kotlin.String! = "finalFieldValue"
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Derived : Base {
|
||||
public constructor Derived()
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ var field: kotlin.String!
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ val finalField: 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