mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 00:21:32 +00:00
Class APIs from java point of view stays the same so we can avoid generating those methods
Otherwise we have to calculate all supertypes when getMethods() is called,
which imposes severe performance penalties
We have to pretend these methods are not 'abstract' (also we consider them 'default' for safety)
so java highlighting does not report "class should be abstract" for all inheritors
We have to manually report "class should be abstract" on some of the java inheritors,
specifically those that are implementing interfaces directly
as opposed to extending kotlin classes implementing those interfaces
24 lines
935 B
Kotlin
Vendored
24 lines
935 B
Kotlin
Vendored
interface <lineMarker descr="*">A</lineMarker> {
|
|
fun <lineMarker descr="<html><body>Is overridden in <br> C</body></html>">foo</lineMarker>(): String = "A"
|
|
|
|
val <lineMarker descr="<html><body>Is implemented in <br/> C</body></html>">some</lineMarker>: String? get() = null
|
|
|
|
var <lineMarker descr="<html><body>Is implemented in <br/> C</body></html>">other</lineMarker>: String?
|
|
get() = null
|
|
set(value) {}
|
|
}
|
|
|
|
open class <lineMarker descr="*">B</lineMarker> : A
|
|
|
|
class C: B() {
|
|
override val <lineMarker descr="Overrides property in 'A'">some</lineMarker>: String = "S"
|
|
|
|
override var <lineMarker descr="Overrides property in 'A'">other</lineMarker>: String?
|
|
get() = null
|
|
set(value) {}
|
|
|
|
override fun <lineMarker descr="Overrides function in 'A'">foo</lineMarker>(): String {
|
|
return super<S1>.foo()
|
|
}
|
|
}
|