Files
kotlin-fork/idea/testData/checker/ClassObjects.kt
T
Alexander Udalov c4b5577555 Do not report NO_CLASS_OBJECT when namespacesAllowed=true
Now with nested classes the expression "A.something" makes sense even when A
doesn't have a class object ("something" could be a nested class)

Also "A" expression now gets a NamespaceType with the scope of all static
nested classes of A

 #KT-1174 In Progress
2013-01-16 23:11:50 +04:00

30 lines
400 B
Kotlin

package Jet86
class A {
class object {
val x = 1
}
<error>class object { // error
val x = 1
}</error>
}
class B() {
val x = 12
}
object b {
<error>class object {
val x = 1
}</error> // error
}
val a = A.x
val c = B.<error>x</error>
val d = b.<error>x</error>
val s = <error>System</error> // error
fun test() {
System.out.println()
java.lang.System.out.println()
}