Add FIR test for 'Exception' constructor resolve ambiguity (type alias)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
fun box(): String = "OK"
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
if (box() == "OK") {
|
||||
throw Exception("Hello")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
FILE: exception.kt
|
||||
public final fun box(): R|kotlin/String| {
|
||||
^box String(OK)
|
||||
}
|
||||
public final fun main(args: R|kotlin/Array<kotlin/String>|): R|kotlin/Unit| {
|
||||
when () {
|
||||
==(R|/box|(), String(OK)) -> {
|
||||
throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#(String(Hello))
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user