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
11 lines
422 B
Kotlin
Vendored
11 lines
422 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
interface AutoCloseable
|
|
interface Closeable : AutoCloseable
|
|
|
|
fun <T1 : AutoCloseable, R1> T1.myUse(f: (T1) -> R1): R1 = f(this)
|
|
fun <T2 : Closeable, R2> T2.myUse(f: (T2) -> R2): R2 = f(this)
|
|
|
|
fun test1(x: Closeable) = x.myUse { 42 }
|
|
fun test2(x: Closeable) = x.myUse<Closeable, Int> { 42 }
|
|
fun test3(x: Closeable) = x.myUse<<!UPPER_BOUND_VIOLATED{OI}!>AutoCloseable<!>, Int> { 42 } // TODO KT-10681
|