mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +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
40 lines
1.1 KiB
Java
Vendored
40 lines
1.1 KiB
Java
Vendored
package test;
|
|
|
|
public class ExtendClassWithDefaultImplementationComplext {
|
|
<error descr="Class 'Test1' must either be declared abstract or implement abstract method 'a()' in 'A'">public static class Test1 implements A</error> {
|
|
|
|
}
|
|
|
|
public static class Test2 extends AI implements A {
|
|
|
|
}
|
|
|
|
<error descr="Class 'Test3' must either be declared abstract or implement abstract method 'b()' in 'B'">public static class Test3 extends AI implements B</error> {
|
|
|
|
}
|
|
|
|
public static class Test4 extends BI implements B {
|
|
|
|
}
|
|
|
|
<error descr="Class 'Test5' must either be declared abstract or implement abstract method 'c()' in 'C'">public static class Test5 extends BI implements C</error> {
|
|
|
|
}
|
|
|
|
<error descr="Class 'Test6' must either be declared abstract or implement abstract method 'd()' in 'D'">public static class Test6 extends BI implements D</error> {
|
|
|
|
}
|
|
|
|
public static class Test7 extends BI implements S {
|
|
|
|
}
|
|
|
|
public static interface Test8 extends A {
|
|
|
|
}
|
|
|
|
public static abstract class Test9 implements A {
|
|
|
|
}
|
|
}
|