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
23 lines
739 B
Kotlin
Vendored
23 lines
739 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
|
|
|
|
fun foo(i: Int) {}
|
|
fun foo(s: String) {}
|
|
fun <T> id(x: T): T = x
|
|
fun <T> baz(x: T, y: T): T = TODO()
|
|
|
|
fun test() {
|
|
val x1: (Int) -> Unit = id(id(::foo))
|
|
val x2: (Int) -> Unit = baz(id(::foo), ::foo)
|
|
val x3: (Int) -> Unit = baz(id(::foo), id(id(::foo)))
|
|
val x4: (String) -> Unit = baz(id(::foo), id(id(::foo)))
|
|
val x5: (Double) -> Unit = baz(id(<!UNRESOLVED_REFERENCE!>::foo<!>), id(id(<!UNRESOLVED_REFERENCE!>::foo<!>)))
|
|
|
|
|
|
id<(Int) -> Unit>(id(id(::foo)))
|
|
id(id<(Int) -> Unit>(::foo))
|
|
baz<(Int) -> Unit>(id(::foo), id(id(::foo)))
|
|
baz(id(::foo), id(id<(Int) -> Unit>(::foo)))
|
|
baz(id(::foo), id<(Int) -> Unit>(id(::foo)))
|
|
}
|