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
This commit is contained in:
Alexander Udalov
2012-12-26 17:00:48 +04:00
parent c4b5577555
commit 192a81591b
15 changed files with 213 additions and 38 deletions
@@ -0,0 +1,17 @@
class Outer {
class Nested {
class NestedNested
}
inner class Inner {
inner class InnerInner
}
}
fun f1() = Outer()
fun f2() = Outer.Nested()
fun f3() = Outer.Nested.NestedNested()
fun f4() = Outer.<!UNRESOLVED_REFERENCE!>Inner<!>()
fun f5() = Outer.<!UNRESOLVED_REFERENCE!>Inner<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>InnerInner<!>()
fun f6() = Outer().Inner()
fun f7() = Outer().Inner().InnerInner()