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
50 lines
650 B
Kotlin
Vendored
50 lines
650 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER
|
|
|
|
fun <T, R : Any> foo(body: (R?) -> T): T = fail()
|
|
|
|
fun test1() {
|
|
foo {
|
|
true
|
|
}
|
|
foo { x ->
|
|
true
|
|
}
|
|
}
|
|
|
|
|
|
fun <T, R> bar(body: (R) -> T): T = fail()
|
|
|
|
fun test2() {
|
|
bar {
|
|
true
|
|
}
|
|
bar { x ->
|
|
true
|
|
}
|
|
}
|
|
|
|
fun <T, R> baz(body: (List<R>) -> T): T = fail()
|
|
|
|
fun test3() {
|
|
baz {
|
|
true
|
|
}
|
|
baz { x ->
|
|
true
|
|
}
|
|
}
|
|
|
|
fun <T, R : Any> brr(body: (List<R?>) -> T): T = fail()
|
|
|
|
fun test4() {
|
|
brr {
|
|
true
|
|
}
|
|
brr { x ->
|
|
true
|
|
}
|
|
}
|
|
|
|
fun fail(): Nothing = throw Exception()
|