[FIR] Ignore smartcast for non-final members from Java, ^KT-50219 Fixed

This commit is contained in:
Ivan Kochurkin
2021-12-14 23:55:51 +03:00
committed by teamcity
parent 84927e10b0
commit ee7e04b28e
8 changed files with 68 additions and 0 deletions
@@ -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
}
}
}