mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
13 lines
268 B
Kotlin
Vendored
13 lines
268 B
Kotlin
Vendored
interface Base
|
|
class Derived: Base
|
|
class Another: Base
|
|
operator fun Base.inc(): Derived { return Derived() }
|
|
|
|
public fun box() : String {
|
|
var i : Base
|
|
i = Another()
|
|
val j = ++i
|
|
|
|
return if (j is Derived && i is Derived) "OK" else "fail j = $j i = $i"
|
|
}
|