Report conflicting signatures that are purely inherited from traits
When all signatures are inherited from traits, the origin elements lie outside of the class in question
This commit is contained in:
+1
-1
@@ -8,5 +8,5 @@ trait Bar<T> {
|
||||
fun foo(l: List<T>) {}
|
||||
}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>class Baz()<!>: Foo<String>, Bar<Int> {
|
||||
class <!CONFLICTING_JVM_DECLARATIONS!>Baz()<!>: Foo<String>, Bar<Int> {
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
trait Foo<T> {
|
||||
fun foo(l: List<T>) {}
|
||||
}
|
||||
|
||||
trait Bar<T> {
|
||||
fun foo(l: List<T>) {}
|
||||
}
|
||||
|
||||
class Baz(): Foo<String>, Bar<Int> {
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(l: List<Long>)<!> {}
|
||||
}
|
||||
@@ -7,5 +7,5 @@ trait T2 {
|
||||
get() = 1
|
||||
}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>class C : T1, T2<!> {
|
||||
class <!CONFLICTING_JVM_DECLARATIONS!>C<!> : T1, T2 {
|
||||
}
|
||||
Reference in New Issue
Block a user