Allow resolve class declarations in class objects
Use INACCESSIBLE_OUTER_CLASS_EXPRESSION error for marking already resolved elements #KT-3261 Fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
open class Test {
|
||||
class object {
|
||||
fun testStatic(ic: InnerClass): NotInnerClass = NotInnerClass(ic.value)
|
||||
}
|
||||
|
||||
fun test(): InnerClass = InnerClass(150)
|
||||
|
||||
inner open class InnerClass(val value: Int)
|
||||
open class NotInnerClass(val value: Int)
|
||||
}
|
||||
|
||||
fun box() = if (Test.testStatic(Test().test()).value == 150) "OK" else "FAIL"
|
||||
Reference in New Issue
Block a user