[Wasm] Reuse Callable reference and SAM lowerings from JS

This commit is contained in:
Svyatoslav Kuzmich
2021-10-06 15:23:55 +03:00
parent fbbd436e54
commit 9ef899ef10
80 changed files with 74 additions and 441 deletions
@@ -1,5 +1,5 @@
// WITH_RUNTIME
// IGNORE_BACKEND: WASM
inline class Result<T>(val isSuccess: Boolean)
@@ -1,6 +1,5 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND: WASM
fun interface ResultHandler<T> {
fun onResult(result: Result<T>)
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND: WASM
// !LANGUAGE: +InlineClasses
inline class A(val value: String)
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JVM
inline class Result<T>(val isSuccess: Boolean)
@@ -1,6 +1,5 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND: WASM
fun interface ResultHandler<T> {
@Suppress("RESULT_CLASS_IN_RETURN_TYPE")
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: BRIDGE_ISSUES
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: WASM
// MODULE: lib
// FILE: lib.kt
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: SAM_CONVERSIONS
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: SAM_CONVERSIONS
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: SAM_CONVERSIONS
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: SAM_CONVERSIONS
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: SAM_CONVERSIONS
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: SAM_CONVERSIONS
// !LANGUAGE: +InlineClasses
fun <T1> underlying(a: IC): T1 = bar(a) { it.value as T1 }
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: SAM_CONVERSIONS
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: SAM_CONVERSIONS
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: SAM_CONVERSIONS
// !LANGUAGE: +InlineClasses
fun <T> underlying(a: IC): T = bar(a) {