mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
A set of tests for KT-7561 on codegen side, including exotic inc() functions(). #KT-7561 Fixed.
12 lines
245 B
Kotlin
Vendored
12 lines
245 B
Kotlin
Vendored
open class Base
|
|
class Derived: Base()
|
|
fun Derived.inc(): Derived { return Derived() }
|
|
|
|
public fun box() : String {
|
|
var i : Base
|
|
i = Derived()
|
|
val j = i++
|
|
|
|
return if (j is Derived && i is Derived) "OK" else "fail j = $j i = $i"
|
|
}
|