498f2e534a
It's effectively a breaking change (^KT-62558) K2 assigns flexible type to all static fields (from Java) and, for example, `String? becomes String unlike K1. It affects IR signature generating. That's why signature dump is disabled for some tests. ^KT-57811 Fixed ^KT-61786 Fixed
15 lines
233 B
Kotlin
Vendored
15 lines
233 B
Kotlin
Vendored
// ISSUE: KT-57811, KT-61786
|
|
|
|
// FILE: JavaClass.java
|
|
|
|
public class JavaClass {
|
|
public static final String X = null;
|
|
}
|
|
|
|
// FILE: main.kt
|
|
|
|
fun test(x1: String?): String {
|
|
val x: String?
|
|
x = x1 ?: JavaClass.X
|
|
return x
|
|
} |