[FIR] Add diagnostic CONFLICTING_OVERLOADS & REDECLARATION
This commit is contained in:
+2
-2
@@ -7,8 +7,8 @@ class MyClass {
|
||||
|
||||
class MyClass2 {}
|
||||
|
||||
fun MyClass2.component1() = 1.2
|
||||
fun MyClass2.component1() = 1.3
|
||||
<!CONFLICTING_OVERLOADS!>fun MyClass2.component1() = 1.2<!>
|
||||
<!CONFLICTING_OVERLOADS!>fun MyClass2.component1() = 1.3<!>
|
||||
|
||||
fun test(mc1: MyClass, mc2: MyClass2) {
|
||||
val (<!INAPPLICABLE_CANDIDATE!>a<!>, <!UNRESOLVED_REFERENCE!>b<!>) = mc1
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
class A {
|
||||
operator fun component1() = 1
|
||||
operator fun component1() = 1
|
||||
<!CONFLICTING_OVERLOADS!>operator fun component1() = 1<!>
|
||||
<!CONFLICTING_OVERLOADS!>operator fun component1() = 1<!>
|
||||
operator fun component2() = 1
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -3,10 +3,10 @@
|
||||
// KT-3464 Front-end shouldn't allow override modifier in class declaration
|
||||
|
||||
override class A {
|
||||
override companion object {}
|
||||
open companion <!MANY_COMPANION_OBJECTS!>object<!> {}
|
||||
abstract companion <!MANY_COMPANION_OBJECTS!>object<!> {}
|
||||
final companion <!MANY_COMPANION_OBJECTS!>object<!> {}
|
||||
override companion <!REDECLARATION!>object<!> {}
|
||||
open companion <!MANY_COMPANION_OBJECTS, REDECLARATION!>object<!> {}
|
||||
abstract companion <!MANY_COMPANION_OBJECTS, REDECLARATION!>object<!> {}
|
||||
final companion <!MANY_COMPANION_OBJECTS, REDECLARATION!>object<!> {}
|
||||
}
|
||||
|
||||
override object B1 {}
|
||||
|
||||
Reference in New Issue
Block a user