mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +00:00
18 lines
306 B
Kotlin
Vendored
18 lines
306 B
Kotlin
Vendored
open class C() {
|
|
/**
|
|
* This method returns zero.
|
|
*/
|
|
open fun foo(): Int = 0
|
|
}
|
|
|
|
class D(): C() {
|
|
override fun foo(): Int = 1
|
|
}
|
|
|
|
|
|
fun test() {
|
|
D().f<caret>oo()
|
|
}
|
|
|
|
//INFO: <pre><b>public</b> <b>open</b> <b>fun</b> foo(): Int <i>defined in</i> D</pre><p>This method returns zero.</p>
|