[Tests] Migrate backend-independent tests from native to compiler/testData.
^KT-65979
This commit is contained in:
committed by
Space Team
parent
dd9332d9e1
commit
febac0dd5f
@@ -0,0 +1,26 @@
|
||||
// WITH_STDLIB
|
||||
// MODULE: lib
|
||||
// FILE: lib.kt
|
||||
|
||||
open class Outer {
|
||||
open inner class Inner1
|
||||
inner class Middle {
|
||||
inner class Inner2 : Inner1() {
|
||||
fun getOuter() = this@Outer
|
||||
fun getMiddle() = this@Middle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(): String {
|
||||
val o = Outer().Middle().Inner2()
|
||||
assertNotSame(o.getOuter(), Outer())
|
||||
assertNotSame(o.getMiddle(), Outer().Middle())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user