e6b5cb5216
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
36 lines
732 B
Kotlin
Vendored
36 lines
732 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// SKIP_TXT
|
|
|
|
class ExcA : Exception()
|
|
|
|
class ExcB(val map: Map<Int, Int>) : Exception()
|
|
|
|
fun test0(): List<Int> = run {
|
|
try {
|
|
emptyList()
|
|
} finally {
|
|
<!UNUSED_EXPRESSION!>""<!>
|
|
fun foo() {}
|
|
}
|
|
}
|
|
|
|
fun test1(): Map<Int, Int> = run {
|
|
try {
|
|
emptyMap()
|
|
} catch (e: ExcA) {
|
|
emptyMap()
|
|
} catch (e: ExcB) {
|
|
e.map
|
|
} finally {
|
|
<!UNUSED_EXPRESSION!>""<!>
|
|
}
|
|
}
|
|
|
|
fun test2(): Map<Int, Int> = run {
|
|
<!TYPE_MISMATCH{NI}, TYPE_MISMATCH{NI}, TYPE_MISMATCH{NI}!>try {
|
|
emptyMap()
|
|
} catch (e: ExcA) {
|
|
<!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH{OI}, TYPE_MISMATCH{NI}!>mapOf(<!TYPE_MISMATCH{NI}!>"" to ""<!>)<!>
|
|
}<!>
|
|
}
|