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
20 lines
436 B
Kotlin
Vendored
20 lines
436 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
// !LANGUAGE: +NewInference
|
|
|
|
interface ILength {
|
|
val length: Int
|
|
}
|
|
|
|
class Impl(override val length: Int) : ILength
|
|
|
|
fun <T> foo(a: (Int) -> T) = 0
|
|
fun <T : ILength> bar(a: (Int) -> T) {
|
|
a(42).length
|
|
}
|
|
|
|
fun test() {
|
|
foo<String> <!TYPE_MISMATCH{NI}!>{ <!TYPE_MISMATCH{OI}!><!>}<!>
|
|
bar<Impl> <!TYPE_MISMATCH{NI}, TYPE_MISMATCH{NI}!>{ <!TYPE_MISMATCH{OI}!><!>}<!>
|
|
}
|