Files
kotlin/compiler/testData/diagnostics/tests/script/NestedInnerClass.kts
2015-11-19 22:56:57 +03:00

24 lines
647 B
Kotlin
Vendored

// documents inconsistency between scripts and classes, see DeclarationScopeProviderImpl
fun function() = 42
val property = ""
class Nested {
fun f() = <!INACCESSIBLE_OUTER_CLASS_EXPRESSION!>function()<!>
fun g() = <!INACCESSIBLE_OUTER_CLASS_EXPRESSION!>property<!>
}
inner class Inner {
fun innerFun() = function()
val innerProp = property
fun innerThisFun() = this@NestedInnerClass.function()
val innerThisProp = this@NestedInnerClass.property
inner class InnerInner {
fun f() = innerFun()
fun g() = innerProp
fun h() = this@Inner.innerFun()
fun i() = this@Inner.innerProp
}
}