WASM: Enable exception handling tests
This commit is contained in:
committed by
TeamCityServer
parent
ef2970a888
commit
00f61978b8
+6
-2
@@ -1,6 +1,10 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
||||
// WITH_RUNTIME
|
||||
|
||||
// IGNORE_BACKEND: WASM
|
||||
// Result::getOrNull contains cast (value as T). It gets inlined but type parameter is not updated. We loose information that it was
|
||||
// a String and instead we treat it as Any. We then fail to assign it into temporary variable of type String?.
|
||||
// WASM_MUTE_REASON: TYPE_ISSUES
|
||||
|
||||
fun f1(): () -> Result<String> {
|
||||
return {
|
||||
runCatching {
|
||||
|
||||
+6
-2
@@ -1,6 +1,10 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
||||
// WITH_RUNTIME
|
||||
|
||||
// IGNORE_BACKEND: WASM
|
||||
// Result::getOrNull contains cast (value as T). It gets inlined but type parameter is not updated. We loose information that it was
|
||||
// a String and instead we treat it as Any. We then fail to assign it into temporary variable of type String?.
|
||||
// WASM_MUTE_REASON: TYPE_ISSUES
|
||||
|
||||
fun f1() = lazy {
|
||||
runCatching {
|
||||
"OK"
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
||||
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Inner(val x: Int)
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
||||
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class A(val x: String = "")
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
||||
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class A(val x: Any? = null)
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
||||
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class A(val x: Int = 0)
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
||||
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JS, JS_IR
|
||||
// IGNORE_BACKEND: JS, JS_IR, WASM
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// FULL_JDK
|
||||
// WITH_RUNTIME
|
||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||
|
||||
inline class Id(val id: String)
|
||||
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
||||
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Result<out T>(val value: Any?) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: TYPE_ISSUES
|
||||
|
||||
inline class Result<out T>(val value: Any?) {
|
||||
fun exceptionOrNull(): Throwable? =
|
||||
when (value) {
|
||||
|
||||
Reference in New Issue
Block a user