fe8d68ecc7
Before this commit, we used same transformers for all modules, which provoked using same ScopeSession for all modules. Now we re-create transformers for any new module. This fixes some problems with incorrect caching in ScopeSession. NB: this provokes ambiguities in some old FE tests, mostly they're correct (same as old FE).
37 lines
528 B
Kotlin
Vendored
37 lines
528 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// MODULE: m1
|
|
// FILE: a.kt
|
|
package p
|
|
|
|
public interface B<T> {
|
|
public fun <R> foo(a: T, b : R)
|
|
}
|
|
|
|
// MODULE: m2(m1)
|
|
// FILE: b.kt
|
|
package p
|
|
|
|
public interface C : B<Any?> {
|
|
override fun <R> foo(a: Any?, b : R)
|
|
|
|
}
|
|
|
|
// MODULE: m3
|
|
// FILE: b.kt
|
|
package p
|
|
|
|
public interface B {
|
|
public fun <T, R> foo(a: T, b: R)
|
|
}
|
|
|
|
// MODULE: m4(m3, m2)
|
|
// FILE: c.kt
|
|
import p.*
|
|
|
|
fun test(b: B?, c: C) {
|
|
b?.foo(1, 1)
|
|
c.<!AMBIGUITY!>foo<!>(1, 1)
|
|
if (b is C) {
|
|
b?.<!AMBIGUITY!>foo<!>(1, 1)
|
|
}
|
|
} |