mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
This is needed because different modules/libraries may define classes with the same FqNames, which may be identical or slightly different. Such classes must be considered equal, because your dependencies may rely on different packagings of the same codebase, and the classes there will be distinct though identical (think intellij-core vs idea-full).
29 lines
348 B
Kotlin
Vendored
29 lines
348 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
|
|
// MODULE: m1
|
|
// FILE: a.kt
|
|
|
|
package p
|
|
|
|
public class A<T>
|
|
public class M1 {
|
|
public val a: A<Int> = A<Int>()
|
|
}
|
|
|
|
// MODULE: m2
|
|
// FILE: b.kt
|
|
|
|
package p
|
|
|
|
public class A
|
|
|
|
public fun foo(a: A) {
|
|
}
|
|
|
|
// MODULE: m3(m1, m2)
|
|
// FILE: b.kt
|
|
|
|
import p.*
|
|
|
|
fun test() {
|
|
foo(<!TYPE_MISMATCH!>M1().a<!>)
|
|
} |