mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
Light class builder: do not generate methods delegating to DefaultImpls in kotlin classes
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
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package test
|
||||
|
||||
interface A {
|
||||
fun a() = Unit
|
||||
}
|
||||
|
||||
open class AI : A
|
||||
|
||||
interface B : A {
|
||||
fun b() = Unit
|
||||
}
|
||||
|
||||
open class BI: B
|
||||
|
||||
interface C: B {
|
||||
fun c() = Unit
|
||||
}
|
||||
|
||||
interface D {
|
||||
fun d() = Unit
|
||||
}
|
||||
|
||||
interface S {
|
||||
fun a() = Unit
|
||||
fun b() = Unit
|
||||
}
|
||||
Reference in New Issue
Block a user