bcc8802014
Expression will be checked against expected type later. Theoretically, this is not very good, but it aligns with the old inference, plus it helps avoiding multiple type mismatch diagnostics.
22 lines
267 B
Kotlin
Vendored
22 lines
267 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
|
// MODULE: m1
|
|
// FILE: a.kt
|
|
|
|
package p
|
|
|
|
public class A
|
|
public class B {
|
|
public val a: A = A()
|
|
}
|
|
|
|
// MODULE: m2(m1)
|
|
// FILE: b.kt
|
|
|
|
import p.*
|
|
|
|
class A
|
|
|
|
fun test() {
|
|
val a: A = <!TYPE_MISMATCH!>B().a<!>
|
|
} |