[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,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