mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 08:31:29 +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).
21 lines
244 B
Kotlin
Vendored
21 lines
244 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
|
// MODULE: m1
|
|
// FILE: a.kt
|
|
|
|
package p
|
|
|
|
public class A
|
|
public class B {
|
|
public val a: A = A()
|
|
}
|
|
|
|
// MODULE: m2(m1)
|
|
// FILE: b.kt
|
|
|
|
import p.*
|
|
|
|
class A
|
|
|
|
fun test() {
|
|
val a: A = <!TYPE_MISMATCH!>B().a<!>
|
|
} |