[K/N] Fix equality on fun-interface constructor references

^KT-50204
This commit is contained in:
Pavel Kunyavskiy
2022-01-11 15:36:50 +03:00
committed by Space
parent a378e1e128
commit afc548d5d9
3 changed files with 22 additions and 22 deletions
@@ -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)
@@ -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)