TypeConstructor's equality for classes relies on FqNames

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).
This commit is contained in:
Andrey Breslav
2014-05-21 18:24:03 +04:00
parent f714382bd8
commit a66f44e4f5
25 changed files with 599 additions and 15 deletions
@@ -0,0 +1,23 @@
// MODULE: m1
// FILE: a.kt
package p
public class A
public class B {
public val a: A = A()
}
// MODULE: m2(m1)
// FILE: b.kt
package p
class A {
fun foo() {}
}
fun test() {
val a: A = B().a
a.foo()
}