[FIR] Rewrite redeclaration checks
#KT-60124 Fixed #KT-60573 Fixed
This commit is contained in:
committed by
Space Team
parent
b56f84b533
commit
951b299268
compiler/testData/diagnostics/tests/extensions/contextReceivers/conflictingWithDifferentOrder.fir.kt
Vendored
+4
-4
@@ -3,11 +3,11 @@
|
||||
interface A
|
||||
interface B
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>context(A, B)
|
||||
fun f(): Unit<!> = TODO()
|
||||
context(A, B)
|
||||
fun f(): Unit = TODO()
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>context(B, A)
|
||||
fun f(): Unit<!> = TODO()
|
||||
context(B, A)
|
||||
fun f(): Unit = TODO()
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>with<!>(a) {
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface A
|
||||
interface B
|
||||
interface C
|
||||
interface D
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>context(A, B)
|
||||
fun f(): Unit<!> = TODO()
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>context(C, D)
|
||||
fun f(): Unit<!> = TODO()
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
with(a) {
|
||||
with(b) {
|
||||
f()
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface A
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ class A<T>(val a: T)
|
||||
class B(val b: Any)
|
||||
class C(val c: Any)
|
||||
|
||||
<!MUST_BE_INITIALIZED!>context(A<String>, B) var <!REDECLARATION!>p<!>: Int<!>
|
||||
<!MUST_BE_INITIALIZED!>context(A<String>, B) var p: Int<!>
|
||||
get() {
|
||||
this@A.a.length
|
||||
this@B.b
|
||||
@@ -18,7 +18,7 @@ class C(val c: Any)
|
||||
field = value
|
||||
}
|
||||
|
||||
<!MUST_BE_INITIALIZED!>context(A<Int>, A<String>, B) var <!REDECLARATION!>p<!>: Int<!>
|
||||
<!MUST_BE_INITIALIZED!>context(A<Int>, A<String>, B) var p: Int<!>
|
||||
get() {
|
||||
this@A.a.<!UNRESOLVED_REFERENCE!>toDouble<!>()
|
||||
this@A.a.length
|
||||
|
||||
Reference in New Issue
Block a user