4570872bfd
A set of tests for KT-7561 on codegen side, including exotic inc() functions(). #KT-7561 Fixed.
13 lines
255 B
Kotlin
Vendored
13 lines
255 B
Kotlin
Vendored
trait Base
|
|
class Derived: Base
|
|
class Another: Base
|
|
fun Base.inc(): Derived { return Derived() }
|
|
|
|
public fun box() : String {
|
|
var i : Base
|
|
i = Another()
|
|
val j = i++
|
|
|
|
return if (j is Another && i is Derived) "OK" else "fail j = $j i = $i"
|
|
}
|