c4b5577555
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
30 lines
400 B
Kotlin
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()
|
|
} |