[FE] Make OverloadChecker take CR into account
This commit is contained in:
committed by
teamcity
parent
2bb155edc1
commit
343a860553
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface A
|
||||
interface B
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>context(A, B)
|
||||
fun f(): Unit<!> = TODO()
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>context(A, B)
|
||||
fun f(): Unit<!> = TODO()
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
with(a) {
|
||||
with(b) {
|
||||
f()
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface A
|
||||
interface B
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>context(A, B)
|
||||
fun f(): Unit<!> = TODO()
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>context(A, B)
|
||||
fun f(): Unit<!> = TODO()
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
with(a) {
|
||||
with(b) {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>f<!>()
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
context(A, B) public fun f(): kotlin.Unit
|
||||
context(A, B) public fun f(): kotlin.Unit
|
||||
public fun test(/*0*/ a: A, /*1*/ b: B): kotlin.Unit
|
||||
|
||||
public interface A {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface B {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
compiler/testData/diagnostics/tests/extensions/contextReceivers/conflictingWithDifferentOrder.fir.kt
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface A
|
||||
interface B
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>context(A, B)
|
||||
fun f(): Unit<!> = TODO()
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>context(B, A)
|
||||
fun f(): Unit<!> = TODO()
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
with(a) {
|
||||
with(b) {
|
||||
f()
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface A
|
||||
interface B
|
||||
|
||||
context(A, B)
|
||||
fun f(): Unit = TODO()
|
||||
|
||||
context(B, A)
|
||||
fun f(): Unit = TODO()
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
with(a) {
|
||||
with(b) {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>f<!>()
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
context(A, B) public fun f(): kotlin.Unit
|
||||
context(B, A) public fun f(): kotlin.Unit
|
||||
public fun test(/*0*/ a: A, /*1*/ b: B): kotlin.Unit
|
||||
|
||||
public interface A {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface B {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// !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()
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface A
|
||||
interface B
|
||||
interface C
|
||||
interface D
|
||||
|
||||
context(A, B)
|
||||
fun f(): Unit = TODO()
|
||||
|
||||
context(C, D)
|
||||
fun f(): Unit = TODO()
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
with(a) {
|
||||
with(b) {
|
||||
f()
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package
|
||||
|
||||
context(A, B) public fun f(): kotlin.Unit
|
||||
context(C, D) public fun f(): kotlin.Unit
|
||||
public fun test(/*0*/ a: A, /*1*/ b: B): kotlin.Unit
|
||||
|
||||
public interface A {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface B {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface C {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface D {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user