[IR][tests] Removal of class used as variable type and constructor call

This commit is contained in:
Dmitriy Dolovov
2022-06-08 23:07:51 +03:00
parent d5ded97ccb
commit ce04a24b26
18 changed files with 93 additions and 0 deletions
@@ -0,0 +1 @@
class Foo
@@ -0,0 +1 @@
//class Foo
@@ -0,0 +1,6 @@
STEP 0:
dependencies: stdlib
STEP 1:
dependencies: stdlib
modifications:
U : l1.kt.1 -> l1.kt
@@ -0,0 +1,3 @@
fun bar() {
check(Foo().toString() != "Bar")
}
@@ -0,0 +1,2 @@
STEP 0:
dependencies: stdlib, lib1
@@ -0,0 +1,13 @@
fun box(): String {
try {
bar()
return "FAIL1"
} catch (e: Throwable) {
if (!e.isLinkageError("/Foo.<init>")) return "FAIL2"
}
return "OK"
}
private fun Throwable.isLinkageError(symbolName: String): Boolean =
this::class.simpleName == "IrLinkageError" && message?.startsWith("Unlinked IR symbol $symbolName|") == true
@@ -0,0 +1,2 @@
STEP 0:
dependencies: stdlib, lib1, lib2
@@ -0,0 +1,7 @@
MODULES: lib1, lib2, main
STEP 0:
libs: lib1, lib2, main
STEP 1:
libs: lib1