2ecba6ac39
This directive anyway does not make test run twice with OI, and with NI It only once run the test with specific settings (// LANGUAGE) and ignores irrelevant (OI or NI tags)
35 lines
537 B
Kotlin
Vendored
35 lines
537 B
Kotlin
Vendored
// SKIP_TXT
|
|
|
|
class ExcA : Exception()
|
|
|
|
class ExcB(val map: Map<Int, Int>) : Exception()
|
|
|
|
fun test0(): List<Int> = run {
|
|
try {
|
|
emptyList()
|
|
} finally {
|
|
""
|
|
fun foo() {}
|
|
}
|
|
}
|
|
|
|
fun test1(): Map<Int, Int> = run {
|
|
try {
|
|
emptyMap()
|
|
} catch (e: ExcA) {
|
|
emptyMap()
|
|
} catch (e: ExcB) {
|
|
e.map
|
|
} finally {
|
|
""
|
|
}
|
|
}
|
|
|
|
fun test2(): Map<Int, Int> = run {
|
|
<!ARGUMENT_TYPE_MISMATCH!>try {
|
|
emptyMap()
|
|
} catch (e: ExcA) {
|
|
mapOf("" to "")
|
|
}<!>
|
|
}
|