[FIR] Add diagnostic CONFLICTING_OVERLOADS & REDECLARATION

This commit is contained in:
Nick
2020-08-05 09:35:10 +03:00
parent 36984009e9
commit 4669e019d1
72 changed files with 681 additions and 247 deletions
+4 -4
View File
@@ -13,7 +13,7 @@ class B()
class C(val b : B)
fun get(f: Boolean) = if (f) {A.A1} else {""}
fun case2() {
<!CONFLICTING_OVERLOADS!>fun case2() {
val flag: Any = get(false) //string
val l1 = when (flag!!) { // should be NO_ELSE_IN_WHEN
@@ -25,9 +25,9 @@ fun case2() {
A.A1 -> B()
A.A2 -> B()
}
}
}<!>
fun case2() {
<!CONFLICTING_OVERLOADS!>fun case2() {
val flag: Any = get(true) //A
val l1 = when (flag!!) {// should be NO_ELSE_IN_WHEN
@@ -39,7 +39,7 @@ fun case2() {
A.A1 -> B()
A.A2 -> B()
}
}
}<!>
fun case3() {