[K/N] Fix equality on fun-interface constructor references
^KT-50204
This commit is contained in:
+4
-6
@@ -6,20 +6,18 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// ^ wasm-function[1893]:0x1cf8a: RuntimeError: dereferencing a null pointer
|
||||
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// ^ Fail due to the initialization order. Doesn't fail with new MM
|
||||
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// ^ TypeError: tmp is not a function
|
||||
|
||||
// FILE: funInterfaceConstructorEquality.kt
|
||||
// FILE: funInterfaceConstructedObjectsEquality.kt
|
||||
|
||||
val ks1: (() -> String) -> KSupplier<String> =
|
||||
::KSupplier
|
||||
|
||||
val ks11Foo = ks1(::foo)
|
||||
val ks21Foo = ks2(::foo)
|
||||
// getter is used to avoid dependency on lazy initialization support
|
||||
val ks21Foo get() = ks2(::foo)
|
||||
|
||||
fun interface KStringSupplier {
|
||||
fun get(): String
|
||||
@@ -71,5 +69,5 @@ fun bar() = "def"
|
||||
val ks2: (() -> String) -> KSupplier<String> =
|
||||
::KSupplier
|
||||
|
||||
val ks12Foo = ks1(::foo)
|
||||
val ks12Foo get() = ks1(::foo)
|
||||
val ks22Foo = ks2(::foo)
|
||||
-3
@@ -6,9 +6,6 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// ^ Failed: ks1 != ks2 (same file, same SAM type)
|
||||
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// ^ Fail due to the initialization order. Doesn't fail with new MM
|
||||
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// ^ Failed: ks1 != ks2 (same file, same SAM type)
|
||||
|
||||
Reference in New Issue
Block a user