Added static methods, nested classes and companion object from superclasses.

This commit is contained in:
Stanislav Erokhin
2015-10-01 21:00:44 +03:00
parent ace99f6c3f
commit d5dbc9638d
53 changed files with 2657 additions and 19 deletions
@@ -0,0 +1,64 @@
open class A {
inner class B {
fun foo() {}
}
inner class D
companion object {
class B {
fun bar() {}
}
class C
}
init {
B().foo()
B().<!UNRESOLVED_REFERENCE!>bar<!>()
D()
C()
}
}
class E: A() {
init {
B().foo()
B().<!UNRESOLVED_REFERENCE!>bar<!>()
D()
C()
}
object Z {
init {
<!NESTED_CLASS_SHOULD_BE_QUALIFIED!>B<!>().<!UNRESOLVED_REFERENCE!>foo<!>() // todo: some resolve hacks
<!NESTED_CLASS_SHOULD_BE_QUALIFIED!>B<!>().bar()
<!NO_COMPANION_OBJECT, FUNCTION_EXPECTED!>D<!>()
C()
}
}
}
class F: A() {
class B {
fun fas() {}
}
inner class D {
fun f() {}
}
init {
B().fas()
D().f()
}
companion object {
init {
B().fas()
<!NO_COMPANION_OBJECT, FUNCTION_EXPECTED!>D<!>().<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>f<!>()
}
}
}