[FIR] Add diagnostic CONFLICTING_OVERLOADS & REDECLARATION
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
fun bar(x: String): Int = 1
|
||||
fun bar(x: String): Double = 1
|
||||
<!CONFLICTING_OVERLOADS!>fun bar(x: String): Int = 1<!>
|
||||
<!CONFLICTING_OVERLOADS!>fun bar(x: String): Double = 1<!>
|
||||
|
||||
fun baz(x: String): Int = 1
|
||||
fun <T, R> foobaz(x: T): R = TODO()
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
<!CONFLICTING_OVERLOADS!>@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
<!HIDDEN!>@kotlin.internal.LowPriorityInOverloadResolution<!>
|
||||
fun foo(): Int = 1
|
||||
fun foo(): Int = 1<!>
|
||||
|
||||
fun foo(): String = ""
|
||||
<!CONFLICTING_OVERLOADS!>fun foo(): String = ""<!>
|
||||
|
||||
fun test() {
|
||||
val s = foo()
|
||||
|
||||
@@ -13,7 +13,7 @@ fun test() {
|
||||
val Any.bar get() = "456"
|
||||
val String.bar get() = "987"
|
||||
|
||||
val t = "".bar
|
||||
<!REDECLARATION!>val t = "".bar<!>
|
||||
|
||||
val p = Pair(0, "")
|
||||
|
||||
@@ -21,4 +21,4 @@ class Base<T>(val x: T)
|
||||
class Derived : Base<Int>(10)
|
||||
val xx = Derived().x + 1
|
||||
|
||||
val t = throw AssertionError("")
|
||||
<!REDECLARATION!>val t = throw AssertionError("")<!>
|
||||
Reference in New Issue
Block a user