mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
default methods: check unrelated defaults (IDEA-91685;IDEA-98792)
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
interface B { default void foo() {} }
|
||||
interface C { default void foo() {} }
|
||||
class <error descr="D inherits unrelated defaults for foo() from types B and C">D</error> implements B, C {}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
interface FirstParent {
|
||||
|
||||
default int doSomething() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
interface SecondParent {
|
||||
|
||||
int doSomething();
|
||||
}
|
||||
|
||||
class <error descr="Class 'SecondParent' must either be declared abstract or implement abstract method 'doSomething()' in 'SecondParent'">FirstSon</error> implements FirstParent, SecondParent {}
|
||||
|
||||
<error descr="Class 'SecondSon' must either be declared abstract or implement abstract method 'doSomething()' in 'SecondParent'">class SecondSon implements SecondParent, FirstParent</error> {}
|
||||
Reference in New Issue
Block a user