Skip to content

Commit 57f96b0

Browse files
cypressiousSpace Team
authored andcommitted
[FIR] Trim diagnostic message for NONE_APPLICABLE
1 parent 0b176f6 commit 57f96b0

File tree

11 files changed

+13
-44
lines changed

11 files changed

+13
-44
lines changed

analysis/analysis-api/testData/components/resolver/allByPsi/delegatedFieldNestedName.call.txt

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,9 +1508,7 @@ KtBinaryExpression(406,415): '6 + inner'
15081508
Argument type mismatch: actual type is 'String', but 'Float' was expected.
15091509

15101510
fun plus(other: Double): Double:
1511-
Argument type mismatch: actual type is 'String', but 'Double' was expected.
1512-
1513-
>
1511+
Argument type mismatch: actual type is 'String', but 'Double' was expected.>
15141512

15151513
KtConstantExpression(406,407): '6'
15161514
null
@@ -1741,9 +1739,7 @@ KtOperationReferenceExpression(408,409): '+'
17411739
Argument type mismatch: actual type is 'String', but 'Float' was expected.
17421740

17431741
fun plus(other: Double): Double:
1744-
Argument type mismatch: actual type is 'String', but 'Double' was expected.
1745-
1746-
>
1742+
Argument type mismatch: actual type is 'String', but 'Double' was expected.>
17471743

17481744
KtNameReferenceExpression(410,415): 'inner'
17491745
KaSuccessCallInfo:
@@ -2087,9 +2083,7 @@ KtBinaryExpression(428,437): '7 + inner'
20872083
Argument type mismatch: actual type is 'String', but 'Float' was expected.
20882084

20892085
fun plus(other: Double): Double:
2090-
Argument type mismatch: actual type is 'String', but 'Double' was expected.
2091-
2092-
>
2086+
Argument type mismatch: actual type is 'String', but 'Double' was expected.>
20932087

20942088
KtConstantExpression(428,429): '7'
20952089
null
@@ -2320,9 +2314,7 @@ KtOperationReferenceExpression(430,431): '+'
23202314
Argument type mismatch: actual type is 'String', but 'Float' was expected.
23212315

23222316
fun plus(other: Double): Double:
2323-
Argument type mismatch: actual type is 'String', but 'Double' was expected.
2324-
2325-
>
2317+
Argument type mismatch: actual type is 'String', but 'Double' was expected.>
23262318

23272319
KtNameReferenceExpression(432,437): 'inner'
23282320
KaSuccessCallInfo:
@@ -2666,9 +2658,7 @@ KtBinaryExpression(450,459): '8 + inner'
26662658
Argument type mismatch: actual type is 'String', but 'Float' was expected.
26672659

26682660
fun plus(other: Double): Double:
2669-
Argument type mismatch: actual type is 'String', but 'Double' was expected.
2670-
2671-
>
2661+
Argument type mismatch: actual type is 'String', but 'Double' was expected.>
26722662

26732663
KtConstantExpression(450,451): '8'
26742664
null
@@ -2899,9 +2889,7 @@ KtOperationReferenceExpression(452,453): '+'
28992889
Argument type mismatch: actual type is 'String', but 'Float' was expected.
29002890

29012891
fun plus(other: Double): Double:
2902-
Argument type mismatch: actual type is 'String', but 'Double' was expected.
2903-
2904-
>
2892+
Argument type mismatch: actual type is 'String', but 'Double' was expected.>
29052893

29062894
KtNameReferenceExpression(454,459): 'inner'
29072895
KaSuccessCallInfo:

analysis/analysis-api/testData/components/resolver/singleByPsi/withErrors/ambiguous.call.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,4 @@ KtCallExpression(98,109): 'function(1)'
104104
Argument type mismatch: actual type is 'Int', but 'Boolean' was expected.
105105

106106
fun function(c: String): Unit:
107-
Argument type mismatch: actual type is 'Int', but 'String' was expected.
108-
109-
>
107+
Argument type mismatch: actual type is 'Int', but 'String' was expected.>

analysis/analysis-api/testData/components/resolver/singleByPsi/withErrors/ambiguousImplicitInvoke.call.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,4 @@ KtCallExpression(134,137): 'x()'
6060
No value passed for parameter 'a'.
6161

6262
fun Int.invoke(b: Boolean): Unit:
63-
No value passed for parameter 'b'.
64-
65-
>
63+
No value passed for parameter 'b'.>

analysis/analysis-api/testData/components/resolver/singleByPsi/withErrors/ambiguousWithExplicitTypeParameters.call.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,4 @@ KtCallExpression(128,144): 'function<Int>(1)'
131131
No value passed for parameter 'b'.
132132

133133
fun <V> function(v: V, c: String): Unit:
134-
No value passed for parameter 'c'.
135-
136-
>
134+
No value passed for parameter 'c'.>

analysis/analysis-api/testData/components/resolver/singleByPsi/withErrors/ambiguousWithInferredTypeParameters.call.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,4 @@ KtCallExpression(128,139): 'function(1)'
125125
No value passed for parameter 'b'.
126126

127127
fun <V> function(v: V, c: String): Unit:
128-
No value passed for parameter 'c'.
129-
130-
>
128+
No value passed for parameter 'c'.>

analysis/analysis-api/testData/components/resolver/singleByPsi/withErrors/delegatedConstructorCall_this_unresolved.call.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,4 @@ KtConstructorDelegationCall(115,132): 'this(i, j, i * j)'
6262
Too many arguments for 'constructor(p: Int): Sub'.
6363

6464
constructor(i: Int, j: Int): Sub:
65-
Too many arguments for 'constructor(i: Int, j: Int): Sub'.
66-
67-
>
65+
Too many arguments for 'constructor(i: Int, j: Int): Sub'.>

analysis/analysis-api/testData/components/resolver/singleByPsi/withErrors/functionReceiverSubstitutionWithConflict.call.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,4 @@ KtDotQualifiedExpression(106,113): 'f.foo()'
6060
No value passed for parameter 'i'.
6161

6262
fun <B> Foo<B>.foo(s: String): Unit:
63-
No value passed for parameter 's'.
64-
65-
>
63+
No value passed for parameter 's'.>

compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDiagnosticRenderers.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ object FirDiagnosticRenderers {
461461

462462
appendLine()
463463
}
464-
}
464+
}.trim()
465465
}
466466
}
467467

compiler/testData/cli/jvm/readingConfigFromEnvironment/simple.out

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ fun plus(other: Float): Float:
1717

1818
fun plus(other: Double): Double:
1919
Argument type mismatch: actual type is 'String', but 'Double' was expected.
20-
21-
2220
val x = 1 + ""
2321
^
2422
COMPILATION_ERROR

compiler/testData/diagnostics/tests/noneApplicableMessage.fir.diag.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ fun println(message: Float): Unit
1111
fun println(message: Double): Unit
1212
fun println(message: CharArray): Unit
1313

14-
1514
/noneApplicableMessage.fir.kt:(124,134): error: Unresolved reference 'unresolved'.

0 commit comments

Comments
 (0)