[FIR] Remove line breaks after context receivers in diagnostic messages

#KT-62944 Fixed
This commit is contained in:
Kirill Rakhman
2023-10-30 11:02:10 +01:00
committed by Space Team
parent e18a124cbb
commit 0682a1f76d
10 changed files with 60 additions and 4 deletions
@@ -0,0 +1,5 @@
/contextReceiverAmbiguity.kt:13:9: error: overload resolution ambiguity:
context(String) public fun foo(x: Comparable<*>): Unit defined in root package in file contextReceiverAmbiguity.kt
context(String) public fun foo(x: Number): Unit defined in root package in file contextReceiverAmbiguity.kt
foo(1)
^
@@ -0,0 +1 @@
/contextReceiverAmbiguity.kt:(203,206): error: Overload resolution ambiguity between candidates: [context(String) fun foo(x: Comparable<*>): Unit, context(String) fun foo(x: Number): Unit]
@@ -0,0 +1,15 @@
// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
// RENDER_DIAGNOSTICS_FULL_TEXT
context(String)
fun foo(x: Comparable<*>) {}
context(String)
fun foo(x: Number) {}
fun test() {
with("") {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1)
}
}