Files
kotlin-fork/compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.kt
T
Alexander Udalov 192a81591b Resolve qualified nested class expressions
lookupNamespaceType now returns NamespaceType of a scope not only of the
namespace found by name, but also of the classifier static classes scope found
by the same name. This allows correct resolution of expressions
"Class.Nested.member()", where Class comes from Java (previously it was
resolved into a NamespaceDescriptor with a NamespaceType).

NamespaceDescriptor.getNamespaceType() is deleted since there are no sense in
namespace's NamespaceType alone anymore.

Also some minor refactoring (referencedName param is useless)

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

15 lines
211 B
Kotlin

class Outer {
class Nested {
class object {
fun foo() = 42
}
}
class object {
fun bar() = 239
}
}
fun foo() = Outer.Nested.foo()
fun bar() = Outer.bar()