Report a separate diagnostic on inheritance from singletons

This commit is contained in:
Alexander Udalov
2013-12-02 17:13:58 +04:00
parent 2c2e212d0a
commit 310a70bf84
9 changed files with 28 additions and 11 deletions
@@ -0,0 +1,5 @@
enum class E {
ENTRY
}
class A : <!SINGLETON_IN_SUPERTYPE!>E.ENTRY<!>
@@ -14,7 +14,7 @@ package toplevelObjectDeclarations
}
}
object B : <!SUPERTYPE_NOT_INITIALIZED, FINAL_SUPERTYPE!>A<!> {}
object B : <!SINGLETON_IN_SUPERTYPE!>A<!> {}
val x = A.foo()
@@ -1,6 +1,5 @@
package toplevelObjectDeclarations
object CObj {}
object DOjb : <!SUPERTYPE_NOT_INITIALIZED, FINAL_SUPERTYPE!>CObj<!> {}
object DOjb : <!SINGLETON_IN_SUPERTYPE!>CObj<!> {}
@@ -12,7 +12,7 @@ package baz
import foo.Bar
class C: <!SUPERTYPE_NOT_INITIALIZED, FINAL_SUPERTYPE!>Bar<!>
class C: <!SINGLETON_IN_SUPERTYPE!>Bar<!>
fun test() {
Bar.bar()