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
18 lines
1.1 KiB
Kotlin
Vendored
18 lines
1.1 KiB
Kotlin
Vendored
interface <lineMarker descr="*">SkipSupport</lineMarker> {
|
|
fun <lineMarker descr="<html><body>Is implemented in <br> SkipSupportImpl<br> SkipSupportWithDefaults</body></html>">skip</lineMarker>(why: String)
|
|
fun <lineMarker descr="<html><body>Is implemented in <br> SkipSupportWithDefaults</body></html>">skip</lineMarker>()
|
|
}
|
|
|
|
public interface <lineMarker descr="*">SkipSupportWithDefaults</lineMarker> : SkipSupport {
|
|
override fun <lineMarker descr="<html><body>Is overridden in <br> SkipSupportImpl</body></html>"><lineMarker descr="Implements function in 'SkipSupport'">skip</lineMarker></lineMarker>(why: String) {}
|
|
|
|
override fun <lineMarker descr="Implements function in 'SkipSupport'">skip</lineMarker>() {
|
|
skip("not given")
|
|
}
|
|
}
|
|
|
|
open class SkipSupportImpl: SkipSupportWithDefaults {
|
|
override fun <lineMarker descr="Overrides function in 'SkipSupportWithDefaults'">skip</lineMarker>(why: String) = throw RuntimeException(why)
|
|
}
|
|
|
|
// KT-4428 Incorrect override icon shown for overloaded methods |