From 4db209648ddb8d13138c48a10cb23acfa44788ec Mon Sep 17 00:00:00 2001 From: "anastasiia.spaseeva" Date: Tue, 28 Jul 2020 11:14:02 +0300 Subject: [PATCH] [Spec tests] Update spec version --- .../real-literals/p-2/pos/1.1.kt | 2 +- .../real-literals/p-2/pos/1.2.kt | 2 +- .../real-literals/testsMap.json | 4 +- .../p-1/pos/3.1.kt | 2 +- .../testsMap.json | 2 +- .../algorithm-of-msc-selection/p-3/pos/1.1.kt | 2 +- .../algorithm-of-msc-selection/p-3/pos/1.2.kt | 2 +- .../algorithm-of-msc-selection/testsMap.json | 4 +- .../receivers/{p-5 => p-6}/pos/2.1.kt | 4 +- .../receivers/{p-5 => p-6}/pos/2.2.kt | 4 +- .../receivers/{p-5 => p-6}/pos/3.1.kt | 4 +- .../receivers/{p-5 => p-6}/pos/4.2.kt | 4 +- .../receivers/{p-5 => p-6}/pos/5.1.kt | 6 +- .../receivers/testsMap.json | 26 +- .../character-literals/p-1/neg/1.1.kt | 2 +- .../character-literals/p-1/pos/1.1.kt | 2 +- .../character-literals/testsMap.json | 22 +- .../real-literals/p-2/neg/1.1.kt | 2 +- .../real-literals/p-2/neg/1.2.kt | 2 +- .../real-literals/p-2/neg/1.3.kt | 2 +- .../real-literals/p-2/neg/1.4.kt | 2 +- .../real-literals/p-2/pos/1.1.kt | 2 +- .../real-literals/p-2/pos/1.2.kt | 2 +- .../real-literals/testsMap.json | 12 +- .../p-2/neg/{10.1.fir.kt => 11.1.fir.kt} | 2 + .../p-2/neg/{10.1.kt => 11.1.kt} | 4 +- .../p-2/neg/{10.2.fir.kt => 11.2.fir.kt} | 1 + .../p-2/neg/{10.2.kt => 11.2.kt} | 4 +- .../p-2/neg/{10.3.fir.kt => 11.3.fir.kt} | 1 + .../p-2/neg/{10.3.kt => 11.3.kt} | 4 +- .../p-2/neg/{6.1.fir.kt => 9.1.fir.kt} | 1 + .../p-2/neg/{6.1.kt => 9.1.kt} | 4 +- .../p-2/pos/10.1.kt | 20 +- .../p-2/pos/11.1.kt | 25 ++ .../p-2/pos/{10.2.fir.kt => 11.2.fir.kt} | 1 + .../p-2/pos/{10.2.kt => 11.2.kt} | 4 +- .../p-2/pos/{10.3.fir.kt => 11.3.fir.kt} | 1 + .../p-2/pos/{10.3.kt => 11.3.kt} | 4 +- .../p-2/pos/{6.1.fir.kt => 7.1.fir.kt} | 1 + .../p-2/pos/{6.1.kt => 7.1.kt} | 4 +- .../p-2/pos/8.1.kt | 25 -- .../exhaustive-when-expressions/testsMap.json | 324 +++++++++--------- .../when-expression/p-6/neg/11.1.kt | 35 -- .../p-6/neg/{12.1.fir.kt => 7.2.fir.kt} | 1 + .../p-6/neg/{12.1.kt => 7.2.kt} | 6 +- .../p-6/pos/{10.1.fir.kt => 5.1.fir.kt} | 1 + .../p-6/pos/{10.1.kt => 5.1.kt} | 4 +- .../p-6/pos/{10.2.fir.kt => 5.2.fir.kt} | 1 + .../p-6/pos/{10.2.kt => 5.2.kt} | 4 +- .../p-6/pos/{11.1.fir.kt => 6.1.fir.kt} | 1 + .../p-6/pos/{11.1.kt => 6.1.kt} | 4 +- .../when-expression/p-6/pos/6.1.txt | 5 - .../p-6/pos/{12.1.kt => 7.2.kt} | 6 +- .../expressions/when-expression/testsMap.json | 138 ++++---- .../p-5/pos/1.1.fir.kt | 111 ++++++ .../real-literals/p-2/neg/1.1.kt | 2 +- .../real-literals/p-2/neg/1.2.kt | 2 +- .../real-literals/p-2/neg/1.3.kt | 2 +- .../real-literals/p-2/neg/1.4.kt | 2 +- .../real-literals/p-2/pos/1.1.kt | 2 +- .../real-literals/p-2/pos/1.2.kt | 2 +- .../real-literals/p-2/pos/1.3.kt | 2 +- .../real-literals/p-2/pos/1.4.kt | 2 +- .../real-literals/p-2/pos/1.5.kt | 2 +- .../real-literals/p-2/pos/1.6.kt | 2 +- .../real-literals/testsMap.json | 20 +- .../when-expression/p-6/neg/12.1.txt | 160 --------- .../p-6/neg/{9.1.kt => 5.1.kt} | 4 +- .../p-6/neg/{8.1.txt => 5.1.txt} | 2 +- .../p-6/neg/{12.1.kt => 7.1.kt} | 4 +- .../p-6/neg/{11.1.txt => 7.1.txt} | 2 +- .../when-expression/p-6/neg/9.1.txt | 138 -------- .../expressions/when-expression/testsMap.json | 26 +- .../DiagnosticsTestSpecGenerated.java | 133 ++++--- .../FirDiagnosticsTestSpecGenerated.java | 133 ++++--- .../BlackBoxCodegenTestSpecGenerated.java | 22 +- .../parsing/ParsingTestSpecGenerated.java | 16 +- 77 files changed, 680 insertions(+), 865 deletions(-) rename compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/{p-5 => p-6}/pos/2.1.kt (89%) rename compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/{p-5 => p-6}/pos/2.2.kt (90%) rename compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/{p-5 => p-6}/pos/3.1.kt (85%) rename compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/{p-5 => p-6}/pos/4.2.kt (89%) rename compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/{p-5 => p-6}/pos/5.1.kt (91%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/{10.1.fir.kt => 11.1.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/{10.1.kt => 11.1.kt} (90%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/{10.2.fir.kt => 11.2.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/{10.2.kt => 11.2.kt} (97%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/{10.3.fir.kt => 11.3.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/{10.3.kt => 11.3.kt} (95%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/{6.1.fir.kt => 9.1.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/{6.1.kt => 9.1.kt} (97%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/{10.2.fir.kt => 11.2.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/{10.2.kt => 11.2.kt} (92%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/{10.3.fir.kt => 11.3.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/{10.3.kt => 11.3.kt} (97%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/{6.1.fir.kt => 7.1.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/{6.1.kt => 7.1.kt} (97%) delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/11.1.kt rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/{12.1.fir.kt => 7.2.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/{12.1.kt => 7.2.kt} (94%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/{10.1.fir.kt => 5.1.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/{10.1.kt => 5.1.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/{10.2.fir.kt => 5.2.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/{10.2.kt => 5.2.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/{11.1.fir.kt => 6.1.fir.kt} (99%) rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/{11.1.kt => 6.1.kt} (95%) delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.txt rename compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/{12.1.kt => 7.2.kt} (91%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos/1.1.fir.kt delete mode 100644 compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/12.1.txt rename compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/{9.1.kt => 5.1.kt} (91%) rename compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/{8.1.txt => 5.1.txt} (99%) rename compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/{12.1.kt => 7.1.kt} (92%) rename compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/{11.1.txt => 7.1.txt} (99%) delete mode 100644 compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/9.1.txt diff --git a/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt b/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt index 537f7d99504..375126be827 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt +++ b/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt @@ -1,7 +1,7 @@ /* * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Simple real literals with an exponent mark. diff --git a/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt b/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt index 8516d48df46..9765e119940 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt +++ b/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt @@ -1,7 +1,7 @@ /* * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 2 * DESCRIPTION: Real literals suffixed by f/F (float suffix) with an exponent mark. diff --git a/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/testsMap.json b/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/testsMap.json index da6c383145b..99650c36763 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/testsMap.json +++ b/compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/testsMap.json @@ -137,7 +137,7 @@ "pos": { "1": [ { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Real literals suffixed by f/F (float suffix) with an exponent mark.", "path": "compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt", @@ -145,7 +145,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Simple real literals with an exponent mark.", "path": "compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt", diff --git a/compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1/pos/3.1.kt b/compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1/pos/3.1.kt index 5c5e0c74b93..9cf2cb5912c 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1/pos/3.1.kt +++ b/compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1/pos/3.1.kt @@ -3,7 +3,7 @@ /* * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-213 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, equality-expressions, reference-equality-expressions -> paragraph 1 -> sentence 3 * NUMBER: 1 * DESCRIPTION: check equallity by refference via constructor diff --git a/compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/testsMap.json b/compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/testsMap.json index 1730fc76662..55921069f16 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/testsMap.json +++ b/compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/testsMap.json @@ -53,7 +53,7 @@ ], "3": [ { - "specVersion": "0.1-213", + "specVersion": "0.1-435", "casesNumber": 0, "description": "check equallity by refference via constructor", "path": "compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1/pos/3.1.kt", diff --git a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.1.kt b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.1.kt index 7e0997f9f34..d296820fdc4 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.1.kt +++ b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.1.kt @@ -3,7 +3,7 @@ /* * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-366 + * SPEC VERSION: 0.1-435 * MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1 * NUMBER: 1 * DESCRIPTION: If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) <:Widen(Y_k) is built diff --git a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.2.kt b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.2.kt index eb4627cee4d..268534c099e 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.2.kt +++ b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.2.kt @@ -3,7 +3,7 @@ /* * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-366 + * SPEC VERSION: 0.1-435 * MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1 * NUMBER: 2 * DESCRIPTION: If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) <:Widen(Y_k) is built diff --git a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/testsMap.json b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/testsMap.json index 12c91607f50..84ddaaec16f 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/testsMap.json +++ b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/testsMap.json @@ -3,7 +3,7 @@ "pos": { "1": [ { - "specVersion": "0.1-366", + "specVersion": "0.1-435", "casesNumber": 0, "description": "If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) \u003c:Widen(Y_k) is built", "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.2.kt", @@ -11,7 +11,7 @@ "linkType": "main" }, { - "specVersion": "0.1-366", + "specVersion": "0.1-435", "casesNumber": 0, "description": "If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) \u003c:Widen(Y_k) is built", "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.1.kt", diff --git a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/2.1.kt b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/2.1.kt similarity index 89% rename from compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/2.1.kt rename to compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/2.1.kt index cdd366af58c..6a106c732d3 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/2.1.kt +++ b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/2.1.kt @@ -3,8 +3,8 @@ /* * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-268 - * MAIN LINK: overload-resolution, receivers -> paragraph 5 -> sentence 2 + * SPEC VERSION: 0.1-435 + * MAIN LINK: overload-resolution, receivers -> paragraph 6 -> sentence 2 * NUMBER: 1 * DESCRIPTION: implicit this receiver has higher priority than any companion object receiver */ diff --git a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/2.2.kt b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/2.2.kt similarity index 90% rename from compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/2.2.kt rename to compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/2.2.kt index 2bae6e0cc64..8a84ec214ed 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/2.2.kt +++ b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/2.2.kt @@ -3,8 +3,8 @@ /* * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-268 - * MAIN LINK: overload-resolution, receivers -> paragraph 5 -> sentence 2 + * SPEC VERSION: 0.1-435 + * MAIN LINK: overload-resolution, receivers -> paragraph 6 -> sentence 2 * NUMBER: 2 * DESCRIPTION: implicit this receiver has higher priority than any companion object receiver */ diff --git a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/3.1.kt b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/3.1.kt similarity index 85% rename from compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/3.1.kt rename to compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/3.1.kt index b020927235f..0175ac1bf15 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/3.1.kt +++ b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/3.1.kt @@ -3,8 +3,8 @@ /* * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-278 - * MAIN LINK: overload-resolution, receivers -> paragraph 5 -> sentence 3 + * SPEC VERSION: 0.1-435 + * MAIN LINK: overload-resolution, receivers -> paragraph 6 -> sentence 3 * NUMBER: 1 * DESCRIPTION: The phantom static implicit this receiver has higher priority than the current class companion object receiver; */ diff --git a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/4.2.kt b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/4.2.kt similarity index 89% rename from compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/4.2.kt rename to compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/4.2.kt index 4fc7d378b00..f982b94af89 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/4.2.kt +++ b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/4.2.kt @@ -3,8 +3,8 @@ /* * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-278 - * MAIN LINK:overload-resolution, receivers -> paragraph 5 -> sentence 4 + * SPEC VERSION: 0.1-435 + * MAIN LINK:overload-resolution, receivers -> paragraph 6 -> sentence 4 * NUMBER: 2 * DESCRIPTION: Current class companion object receiver has higher priority than any of the superclass companion objects; */ diff --git a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/5.1.kt b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/5.1.kt similarity index 91% rename from compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/5.1.kt rename to compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/5.1.kt index 91d46085df8..849fac46204 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/5.1.kt +++ b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/5.1.kt @@ -3,9 +3,9 @@ /* * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-278 - * MAIN LINK: overload-resolution, receivers -> paragraph 5 -> sentence 5 - * PRIMARY LINKS: overload-resolution, receivers -> paragraph 5 -> sentence 4 + * SPEC VERSION: 0.1-435 + * MAIN LINK: overload-resolution, receivers -> paragraph 6 -> sentence 5 + * PRIMARY LINKS: overload-resolution, receivers -> paragraph 6 -> sentence 4 * NUMBER: 1 * DESCRIPTION: Superclass companion object receivers are prioritized according to the inheritance order */ diff --git a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/testsMap.json b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/testsMap.json index 59e5fd0957b..323350d529f 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/testsMap.json +++ b/compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/testsMap.json @@ -1,58 +1,58 @@ { - "5": { + "6": { "pos": { "2": [ { - "specVersion": "0.1-268", + "specVersion": "0.1-435", "casesNumber": 0, "description": "implicit this receiver has higher priority than any companion object receiver", - "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/2.1.kt", + "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/2.1.kt", "unexpectedBehaviour": false, "linkType": "main" }, { - "specVersion": "0.1-268", + "specVersion": "0.1-435", "casesNumber": 0, "description": "implicit this receiver has higher priority than any companion object receiver", - "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/2.2.kt", + "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/2.2.kt", "unexpectedBehaviour": false, "linkType": "main" } ], "3": [ { - "specVersion": "0.1-278", + "specVersion": "0.1-435", "casesNumber": 0, "description": "The phantom static implicit this receiver has higher priority than the current class companion object receiver;", - "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/3.1.kt", + "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/3.1.kt", "unexpectedBehaviour": false, "linkType": "main" } ], "5": [ { - "specVersion": "0.1-278", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Superclass companion object receivers are prioritized according to the inheritance order", - "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/5.1.kt", + "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/5.1.kt", "unexpectedBehaviour": false, "linkType": "main" } ], "4": [ { - "specVersion": "0.1-278", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Superclass companion object receivers are prioritized according to the inheritance order", - "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/5.1.kt", + "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/5.1.kt", "unexpectedBehaviour": false, "linkType": "primary" }, { - "specVersion": "0.1-278", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Current class companion object receiver has higher priority than any of the superclass companion objects;", - "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/4.2.kt", + "path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/4.2.kt", "unexpectedBehaviour": false, "linkType": "main" } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg/1.1.kt index bccd4475512..4a37c8b5a35 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg/1.1.kt @@ -5,7 +5,7 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-218 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, character-literals -> paragraph 1 -> sentence 1 * PRIMARY LINKS: expressions, constant-literals, character-literals -> paragraph 1 -> sentence 2 * expressions, constant-literals, character-literals -> paragraph 2 -> sentence 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos/1.1.kt index a550a1f147b..fabc8b82673 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos/1.1.kt @@ -6,7 +6,7 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-218 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, character-literals -> paragraph 1 -> sentence 1 * PRIMARY LINKS: expressions, constant-literals, character-literals -> paragraph 1 -> sentence 2 * expressions, constant-literals, character-literals -> paragraph 2 -> sentence 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/testsMap.json index b31bebd53fd..d890ef14c63 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/testsMap.json @@ -3,7 +3,7 @@ "neg": { "1": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 4, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg/1.1.kt", @@ -14,7 +14,7 @@ ], "2": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 4, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg/1.1.kt", @@ -27,7 +27,7 @@ "pos": { "1": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 1, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos/1.1.kt", @@ -38,7 +38,7 @@ ], "2": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 1, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos/1.1.kt", @@ -53,7 +53,7 @@ "neg": { "1": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 4, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg/1.1.kt", @@ -64,7 +64,7 @@ ], "2": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 4, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg/1.1.kt", @@ -77,7 +77,7 @@ "pos": { "1": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 1, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos/1.1.kt", @@ -88,7 +88,7 @@ ], "2": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 1, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos/1.1.kt", @@ -103,7 +103,7 @@ "neg": { "1": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 4, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg/1.1.kt", @@ -125,7 +125,7 @@ "pos": { "1": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 1, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos/1.1.kt", @@ -158,7 +158,7 @@ "pos": { "1": [ { - "specVersion": "0.1-218", + "specVersion": "0.1-435", "casesNumber": 1, "description": "A character literal defines a constant holding a unicode character value", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos/1.1.kt", diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt index 4634aa19361..fcf5de5a042 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt @@ -1,7 +1,7 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Real literals without digits after an exponent mark. diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt index 8c8fd4c9683..9703ee00c0d 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt @@ -1,7 +1,7 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 2 * DESCRIPTION: Real literals with a not allowed exponent mark at the beginning. diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt index 761f4525468..71c090b3284 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt @@ -1,7 +1,7 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 3 * DESCRIPTION: Real literals suffixed by f/F (float suffix) with a not allowed exponent mark at the beginning. diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt index 8b418fdb479..92ad5bb014b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt @@ -1,7 +1,7 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 4 * DESCRIPTION: Real literals suffixed by f/F (float suffix) with an exponent mark without digits after it. diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt index a8efe89f6d1..e4011cf4f0f 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt @@ -1,7 +1,7 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Simple real literals with an exponent mark. diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt index b55dba310f0..dc3af9d3e52 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt @@ -1,7 +1,7 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 2 * DESCRIPTION: Real literals suffixed by f/F (float suffix) with an exponent mark. diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/testsMap.json index 3f90499d4dd..c8d936786ab 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/testsMap.json @@ -259,7 +259,7 @@ "neg": { "1": [ { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 13, "description": "Real literals with a not allowed exponent mark at the beginning.", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt", @@ -267,7 +267,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 13, "description": "Real literals suffixed by f/F (float suffix) with a not allowed exponent mark at the beginning.", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt", @@ -275,7 +275,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 17, "description": "Real literals suffixed by f/F (float suffix) with an exponent mark without digits after it.", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt", @@ -283,7 +283,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 17, "description": "Real literals without digits after an exponent mark.", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt", @@ -295,7 +295,7 @@ "pos": { "1": [ { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 26, "description": "Real literals suffixed by f/F (float suffix) with an exponent mark.", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt", @@ -303,7 +303,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 39, "description": "Simple real literals with an exponent mark.", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt", diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.1.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.fir.kt index 49fa8921105..eb07a21078b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.fir.kt @@ -1,6 +1,8 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION // SKIP_TXT + + // TESTCASE NUMBER: 1 fun case_1(value_1: Boolean?): String = when(value_1) { true -> "" diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.kt similarity index 90% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.kt index 9a521653a8e..9e3a53b5d06 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.kt @@ -4,8 +4,8 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 - * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 11 * NUMBER: 1 * DESCRIPTION: Non-exhaustive when using nullable boolean values. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.2.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.2.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.2.fir.kt index 7c7d3107370..5f3ce02603a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.2.fir.kt @@ -1,6 +1,7 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION // SKIP_TXT + // TESTCASE NUMBER: 1 fun case_1(value_1: SealedClass?): String = when(value_1) { is SealedChild1 -> "" diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.2.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.2.kt index 1ab61dee72a..014eec0ea2a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.2.kt @@ -4,8 +4,8 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 - * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 11 * NUMBER: 2 * DESCRIPTION: Non-exhaustive when using subclasses of the nullable sealed class. * HELPERS: sealedClasses diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.3.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.3.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.3.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.3.fir.kt index b935989c88a..e91e58f4ee1 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.3.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.3.fir.kt @@ -1,6 +1,7 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION // SKIP_TXT + // TESTCASE NUMBER: 1 fun case_1(value_1: EnumClass?): String = when(value_1) { EnumClass.EAST -> "" diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.3.kt similarity index 95% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.3.kt index 24bcc94fac8..1a7f76a7371 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.3.kt @@ -4,8 +4,8 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 - * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 11 * NUMBER: 3 * DESCRIPTION: Non-exhaustive when using nullable enum values. * HELPERS: enumClasses diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/9.1.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/9.1.fir.kt index 5d0b3f2316a..64a2e11d768 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/9.1.fir.kt @@ -1,6 +1,7 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION // SKIP_TXT + // TESTCASE NUMBER: 1 fun case_1(value_1: SealedClass): String = when(value_1) { is SealedChild1 -> "" diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/9.1.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/9.1.kt index c172a38e045..b40e79ef1b0 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/9.1.kt @@ -4,8 +4,8 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 - * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9 * NUMBER: 1 * DESCRIPTION: Non-exhaustive when using subclasses of the sealed class. * HELPERS: sealedClasses diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.1.kt index 0480b878afe..d3db071a1d8 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.1.kt @@ -4,22 +4,22 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10 * NUMBER: 1 - * DESCRIPTION: Exhaustive when using nullable boolean values. + * DESCRIPTION: Exhaustive when using enum values. + * HELPERS: enumClasses */ // TESTCASE NUMBER: 1 -fun case_1(value_1: Boolean?): String = when (value_1) { - true -> "" - false -> "" - null -> "" +fun case_1(dir: EnumClass): String = when (dir) { + EnumClass.EAST -> "" + EnumClass.NORTH -> "" + EnumClass.SOUTH -> "" + EnumClass.WEST -> "" } // TESTCASE NUMBER: 2 -fun case_2(value_1: Boolean?): String = when (value_1) { - true && false && ((true || false)) || true && !!!false && !!!true -> "" - true && false && ((true || false)) || true && !!!false -> "" - null -> "" +fun case_2(value_1: EnumClassSingle): String = when (value_1) { + EnumClassSingle.EVERYTHING -> "" } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt new file mode 100644 index 00000000000..c27fb8f45f7 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt @@ -0,0 +1,25 @@ +// FIR_IDENTICAL +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) + * + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 11 + * NUMBER: 1 + * DESCRIPTION: Exhaustive when using nullable boolean values. + */ + +// TESTCASE NUMBER: 1 +fun case_1(value_1: Boolean?): String = when (value_1) { + true -> "" + false -> "" + null -> "" +} + +// TESTCASE NUMBER: 2 +fun case_2(value_1: Boolean?): String = when (value_1) { + true && false && ((true || false)) || true && !!!false && !!!true -> "" + true && false && ((true || false)) || true && !!!false -> "" + null -> "" +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.2.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.2.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.2.fir.kt index bc9347726d6..a57e44c723c 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.2.fir.kt @@ -1,5 +1,6 @@ // SKIP_TXT + // TESTCASE NUMBER: 1 fun case_1(value_1: EnumClass?): String = when (value_1) { EnumClass.EAST -> "" diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.2.kt similarity index 92% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.2.kt index 11a3fe69227..7eac4bdb0d0 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.2.kt @@ -3,8 +3,8 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 - * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 11 * NUMBER: 2 * DESCRIPTION: Exhaustive when using nullable enum values. * HELPERS: enumClasses diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.3.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.3.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.3.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.3.fir.kt index f6ff5b6497d..8c829c3a324 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.3.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.3.fir.kt @@ -1,5 +1,6 @@ // SKIP_TXT + // TESTCASE NUMBER: 1 fun case_1(value_1: SealedClass?): Int = when (value_1) { is SealedChild1 -> value_1.number diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.3.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.3.kt index 736b2658b44..d08a5fe16d1 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.3.kt @@ -3,8 +3,8 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 - * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 11 * NUMBER: 3 * DESCRIPTION: Exhaustive when using subclasses of the nullable sealed class. * HELPERS: sealedClasses diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.fir.kt index cb995df579a..dda105c886d 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.fir.kt @@ -1,6 +1,7 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION // SKIP_TXT + // TESTCASE NUMBER: 1 fun case_1(value_1: SealedClass): Int = when (value_1) { is SealedChild1 -> value_1.number diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt index 5965fdddd65..ba0ceaeab5a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt @@ -4,8 +4,8 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 - * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 7 * NUMBER: 1 * DESCRIPTION: Exhaustive when using subclasses of the sealed class. * HELPERS: sealedClasses diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt deleted file mode 100644 index 49c20b13b03..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt +++ /dev/null @@ -1,25 +0,0 @@ -// FIR_IDENTICAL -// SKIP_TXT - -/* - * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) - * - * SPEC VERSION: 0.1-100 - * MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 8 - * NUMBER: 1 - * DESCRIPTION: Exhaustive when using enum values. - * HELPERS: enumClasses - */ - -// TESTCASE NUMBER: 1 -fun case_1(dir: EnumClass): String = when (dir) { - EnumClass.EAST -> "" - EnumClass.NORTH -> "" - EnumClass.SOUTH -> "" - EnumClass.WEST -> "" -} - -// TESTCASE NUMBER: 2 -fun case_2(value_1: EnumClassSingle): String = when (value_1) { - EnumClassSingle.EVERYTHING -> "" -} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.json index ad9939d2753..3023f1f32e9 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.json @@ -1,64 +1,32 @@ { "2": { "neg": { - "10": [ + "11": [ { - "specVersion": "0.1-100", - "casesNumber": 6, - "description": "Non-exhaustive when using nullable enum values.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.3.kt", - "unexpectedBehaviour": false, - "linkType": "main", - "helpers": "enumClasses" - }, - { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 10, "description": "Non-exhaustive when using subclasses of the nullable sealed class.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.2.kt", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.2.kt", "unexpectedBehaviour": false, "linkType": "main", "helpers": "sealedClasses" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", + "casesNumber": 6, + "description": "Non-exhaustive when using nullable enum values.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.3.kt", + "unexpectedBehaviour": false, + "linkType": "main", + "helpers": "enumClasses" + }, + { + "specVersion": "0.1-435", "casesNumber": 3, "description": "Non-exhaustive when using nullable boolean values.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.1.kt", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.kt", "unexpectedBehaviour": false, "linkType": "main" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive boolean nullable", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveBooleanNullable.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Non exhaustive warning null", - "path": "compiler/testData/diagnostics/tests/when/NonExhaustiveWarningNull.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Else on nullable enum", - "path": "compiler/testData/diagnostics/tests/when/ElseOnNullableEnum.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Else on nullable enum with smart cast", - "path": "compiler/testData/diagnostics/tests/when/ElseOnNullableEnumWithSmartCast.kt", - "unexpectedBehaviour": false, - "linkType": "primary" } ], "1": [ @@ -185,76 +153,16 @@ "linkType": "primary" } ], - "6": [ + "9": [ { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 12, "description": "Non-exhaustive when using subclasses of the sealed class.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/9.1.kt", "unexpectedBehaviour": false, "linkType": "main", "helpers": "sealedClasses" }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Non exhaustive warning for sealed class", - "path": "compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Redundant else", - "path": "compiler/testData/diagnostics/tests/when/RedundantElse.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Top level sealed", - "path": "compiler/testData/diagnostics/tests/when/TopLevelSealed.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - } - ], - "4": [ - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive boolean nullable", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveBooleanNullable.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive boolean brackets", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveBooleanBrackets.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive boolean complex", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveBooleanComplex.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive boolean", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveBoolean.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - } - ], - "9": [ { "specVersion": "0.1-152", "casesNumber": 0, @@ -360,6 +268,74 @@ "linkType": "primary" } ], + "4": [ + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive boolean nullable", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveBooleanNullable.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive boolean brackets", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveBooleanBrackets.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive boolean complex", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveBooleanComplex.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive boolean", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveBoolean.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + } + ], + "10": [ + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive boolean nullable", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveBooleanNullable.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Non exhaustive warning null", + "path": "compiler/testData/diagnostics/tests/when/NonExhaustiveWarningNull.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Else on nullable enum", + "path": "compiler/testData/diagnostics/tests/when/ElseOnNullableEnum.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Else on nullable enum with smart cast", + "path": "compiler/testData/diagnostics/tests/when/ElseOnNullableEnumWithSmartCast.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + } + ], "5": [ { "specVersion": "0.1-313", @@ -386,6 +362,32 @@ "linkType": "primary" } ], + "6": [ + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Non exhaustive warning for sealed class", + "path": "compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Redundant else", + "path": "compiler/testData/diagnostics/tests/when/RedundantElse.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Top level sealed", + "path": "compiler/testData/diagnostics/tests/when/TopLevelSealed.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + } + ], "7": [ { "specVersion": "0.1-152", @@ -416,56 +418,32 @@ ] }, "pos": { - "10": [ + "11": [ { - "specVersion": "0.1-100", - "casesNumber": 7, - "description": "Exhaustive when using subclasses of the nullable sealed class.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.3.kt", - "unexpectedBehaviour": true, - "linkType": "main", - "helpers": "sealedClasses" - }, - { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 3, "description": "Exhaustive when using nullable enum values.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.2.kt", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.2.kt", "unexpectedBehaviour": true, "linkType": "main", "helpers": "enumClasses" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", + "casesNumber": 7, + "description": "Exhaustive when using subclasses of the nullable sealed class.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.3.kt", + "unexpectedBehaviour": true, + "linkType": "main", + "helpers": "sealedClasses" + }, + { + "specVersion": "0.1-435", "casesNumber": 2, "description": "Exhaustive when using nullable boolean values.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.1.kt", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt", "unexpectedBehaviour": false, "linkType": "main" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive nullable", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveNullable.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Non exhaustive boolean nullable", - "path": "compiler/testData/diagnostics/tests/when/NonExhaustiveBooleanNullable.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive platform enum null", - "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumNull.kt", - "unexpectedBehaviour": false, - "linkType": "primary" } ], "1": [ @@ -577,28 +555,52 @@ "linkType": "primary" } ], - "8": [ + "7": [ { - "specVersion": "0.1-100", - "casesNumber": 2, - "description": "Exhaustive when using enum values.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt", - "unexpectedBehaviour": false, - "linkType": "main", - "helpers": "enumClasses" - } - ], - "6": [ - { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 9, "description": "Exhaustive when using subclasses of the sealed class.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt", "unexpectedBehaviour": true, "linkType": "main", "helpers": "sealedClasses" } ], + "10": [ + { + "specVersion": "0.1-435", + "casesNumber": 2, + "description": "Exhaustive when using enum values.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.1.kt", + "unexpectedBehaviour": false, + "linkType": "main", + "helpers": "enumClasses" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive nullable", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveNullable.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Non exhaustive boolean nullable", + "path": "compiler/testData/diagnostics/tests/when/NonExhaustiveBooleanNullable.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive platform enum null", + "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumNull.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + } + ], "9": [ { "specVersion": "0.1-313", diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/11.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/11.1.kt deleted file mode 100644 index c02b5e2e9e6..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/11.1.kt +++ /dev/null @@ -1,35 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_VALUE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -// SKIP_TXT - -/* - * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) - * - * SPEC VERSION: 0.1-201 - * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 11 - * NUMBER: 1 - * DESCRIPTION: 'When' with bound value and non-expressions in 'when condition'. - */ - -// TESTCASE NUMBER: 1 -fun case_1(value_1: Int, value_2: List): String { - when (value_1) { - while (false) {} -> return "" - do {} while (false) -> return "" - for (value in value_2) {} -> return "" - } - - return "" -} - -// TESTCASE NUMBER: 4 -fun case_4(value_1: Int): String { - var value_2: Int - var value_3 = 10 - - when (value_1) { - value_2 = 10 -> return "" - value_3 %= 10 -> return "" - } - - return "" -} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/12.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.2.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/12.1.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.2.fir.kt index db4414a0505..32bdd2e5cdf 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/12.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.2.fir.kt @@ -1,5 +1,6 @@ // SKIP_TXT + // TESTCASE NUMBER: 1 fun case_1(value_1: Int): String = when { else -> "" diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/12.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.2.kt similarity index 94% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/12.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.2.kt index 2c6b35e643c..6e852166d3d 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/12.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.2.kt @@ -3,9 +3,9 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-201 - * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 12 - * NUMBER: 1 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 7 + * NUMBER: 2 * DESCRIPTION: 'When' without bound value and with 'else' branch not in the last position. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.1.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.fir.kt index 60116e217ce..77ff9719d19 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.fir.kt @@ -1,5 +1,6 @@ // SKIP_TXT + // TESTCASE NUMBER: 1 fun case_1(value_1: Any?) { when (value_1) { diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt index 845fb77aa59..6c1dee6db45 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt @@ -3,8 +3,8 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-201 - * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 10 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 5 * NUMBER: 1 * DESCRIPTION: 'When' with enumeration of the different variants of expressions in 'when condition'. * HELPERS: typesProvider, classes, functions diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.2.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.fir.kt index 652187563b0..843af7b2a83 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.fir.kt @@ -1,5 +1,6 @@ // SKIP_TXT + // TESTCASE NUMBER: 1 fun case_1(value_1: Any?) { when (value_1) { diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt index 216487c3a7e..66104fd2500 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt @@ -3,8 +3,8 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-201 - * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 10 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 5 * NUMBER: 2 * DESCRIPTION: 'When' with different variants of the arithmetic expressions (additive expression and multiplicative expression) in 'when condition'. * HELPERS: typesProvider, classes, functions diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/11.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.fir.kt similarity index 99% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/11.1.fir.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.fir.kt index a8a1129d48b..eb371fc5811 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/11.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.fir.kt @@ -1,5 +1,6 @@ // SKIP_TXT + // TESTCASE NUMBER: 1 fun case_1(value_1: Int): String { while (true) { diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/11.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.kt similarity index 95% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/11.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.kt index 29a7a77304c..b898ba39430 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/11.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.kt @@ -3,8 +3,8 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-201 - * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 11 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 6 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and not allowed break and continue expression (without labels) in 'when condition'. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.txt deleted file mode 100644 index 3e32b1afbe6..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.txt +++ /dev/null @@ -1,5 +0,0 @@ -package - -public fun case_1(/*0*/ value_1: kotlin.Int?): kotlin.String -public fun case_2(/*0*/ value_1: kotlin.Any): kotlin.String -public fun case_3(/*0*/ value_1: kotlin.Int): kotlin.String diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/12.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/7.2.kt similarity index 91% rename from compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/12.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/7.2.kt index d8d14301beb..c442b22a323 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/12.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/7.2.kt @@ -4,9 +4,9 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-201 - * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 12 - * NUMBER: 1 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 7 + * NUMBER: 2 * DESCRIPTION: 'When' without bound value and with else branch in the last position. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.json index e24b6426da8..6a46d75329b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.json @@ -1,16 +1,6 @@ { "6": { "neg": { - "12": [ - { - "specVersion": "0.1-201", - "casesNumber": 3, - "description": "\u0027When\u0027 without bound value and with \u0027else\u0027 branch not in the last position.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/12.1.kt", - "unexpectedBehaviour": false, - "linkType": "main" - } - ], "1": [ { "specVersion": "0.1-296", @@ -116,6 +106,14 @@ } ], "7": [ + { + "specVersion": "0.1-435", + "casesNumber": 3, + "description": "\u0027When\u0027 without bound value and with \u0027else\u0027 branch not in the last position.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.2.kt", + "unexpectedBehaviour": false, + "linkType": "main" + }, { "specVersion": "0.1-313", "casesNumber": 3, @@ -125,32 +123,6 @@ "linkType": "main" } ], - "11": [ - { - "specVersion": "0.1-201", - "casesNumber": 2, - "description": "\u0027When\u0027 with bound value and non-expressions in \u0027when condition\u0027.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/11.1.kt", - "unexpectedBehaviour": false, - "linkType": "main" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "When", - "path": "compiler/testData/diagnostics/tests/when/When.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Redundant else", - "path": "compiler/testData/diagnostics/tests/when/RedundantElse.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - } - ], "5": [ { "specVersion": "0.1-152", @@ -212,19 +184,27 @@ "unexpectedBehaviour": false, "linkType": "primary" } + ], + "11": [ + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "When", + "path": "compiler/testData/diagnostics/tests/when/When.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Redundant else", + "path": "compiler/testData/diagnostics/tests/when/RedundantElse.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + } ] }, "pos": { - "12": [ - { - "specVersion": "0.1-201", - "casesNumber": 2, - "description": "\u0027When\u0027 without bound value and with else branch in the last position.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/12.1.kt", - "unexpectedBehaviour": false, - "linkType": "main" - } - ], "1": [ { "specVersion": "0.1-296", @@ -287,26 +267,6 @@ "linkType": "primary" } ], - "10": [ - { - "specVersion": "0.1-201", - "casesNumber": 26, - "description": "\u0027When\u0027 with different variants of the arithmetic expressions (additive expression and multiplicative expression) in \u0027when condition\u0027.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.2.kt", - "unexpectedBehaviour": true, - "linkType": "main", - "helpers": "typesProvider, classes, functions" - }, - { - "specVersion": "0.1-201", - "casesNumber": 23, - "description": "\u0027When\u0027 with enumeration of the different variants of expressions in \u0027when condition\u0027.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.1.kt", - "unexpectedBehaviour": false, - "linkType": "main", - "helpers": "typesProvider, classes, functions" - } - ], "3": [ { "specVersion": "0.1-296", @@ -328,6 +288,14 @@ } ], "7": [ + { + "specVersion": "0.1-435", + "casesNumber": 2, + "description": "\u0027When\u0027 without bound value and with else branch in the last position.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/7.2.kt", + "unexpectedBehaviour": false, + "linkType": "main" + }, { "specVersion": "0.1-313", "casesNumber": 3, @@ -337,17 +305,25 @@ "linkType": "main" } ], - "11": [ - { - "specVersion": "0.1-201", - "casesNumber": 2, - "description": "\u0027When\u0027 with bound value and not allowed break and continue expression (without labels) in \u0027when condition\u0027.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/11.1.kt", - "unexpectedBehaviour": false, - "linkType": "main" - } - ], "5": [ + { + "specVersion": "0.1-435", + "casesNumber": 23, + "description": "\u0027When\u0027 with enumeration of the different variants of expressions in \u0027when condition\u0027.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt", + "unexpectedBehaviour": false, + "linkType": "main", + "helpers": "typesProvider, classes, functions" + }, + { + "specVersion": "0.1-435", + "casesNumber": 26, + "description": "\u0027When\u0027 with different variants of the arithmetic expressions (additive expression and multiplicative expression) in \u0027when condition\u0027.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt", + "unexpectedBehaviour": true, + "linkType": "main", + "helpers": "typesProvider, classes, functions" + }, { "specVersion": "0.1-313", "casesNumber": 0, @@ -372,6 +348,16 @@ "unexpectedBehaviour": false, "linkType": "primary" } + ], + "6": [ + { + "specVersion": "0.1-435", + "casesNumber": 2, + "description": "\u0027When\u0027 with bound value and not allowed break and continue expression (without labels) in \u0027when condition\u0027.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.kt", + "unexpectedBehaviour": false, + "linkType": "main" + } ] } }, diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos/1.1.fir.kt new file mode 100644 index 00000000000..e20858f465c --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos/1.1.fir.kt @@ -0,0 +1,111 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION +// SKIP_TXT + + + +// FILE: TestCase.kt +// TESTCASE NUMBER: 1 +package testsCase1 +import libPackageCase1.* +import libPackageCase1Explicit.listOf + +class Case1(){ + + fun case() { + listOf(elements1= arrayOf(1)) + } +} + +// FILE: Lib.kt +package libPackageCase1 +import testsCase1.* + +public fun listOf(vararg elements1: T): List = TODO() +fun Case1.listOf(vararg elements1: T): List = TODO() + +// FILE: Lib.kt +package libPackageCase1Explicit + +public fun listOf(vararg elements1: T): List = TODO() + +// FILE: LibtestsPack.kt +package testsCase1 + +public fun listOf(vararg elements1: T): List = TODO() + + +// FILE: TestCase.kt +// TESTCASE NUMBER: 2 +package testsCase2 +import libPackageCase2.* +import libPackageCase2Explicit.listOf + +class Case2(){ + + fun case() { + listOf(elements1= arrayOf(1)) + } +} +class A { + operator fun invoke(vararg elements1: T): List = TODO() +} + + +// FILE: Lib.kt +package libPackageCase2 +import testsCase2.* + +val Case2.listOf: A + get() = A() + +public fun listOf(vararg elements1: T): List = TODO() +fun Case2.listOf(vararg elements1: T): List = TODO() + +// FILE: Lib.kt +package libPackageCase2Explicit + +public fun listOf(vararg elements1: T): List = TODO() + +// FILE: LibtestsPack.kt +package testsCase2 + +public fun listOf(vararg elements1: T): List = TODO() + + +// FILE: TestCase.kt +// TESTCASE NUMBER: 3 +package testsCase3 +import libPackageCase3.* +import libPackageCase3Explicit.listOf + +class Case3(){ + + fun case() { + listOf(elements1= arrayOf(1)) + } +} +class A { + operator fun invoke(vararg elements1: T): List = TODO() +} + + +// FILE: Lib.kt +package libPackageCase3 +import testsCase3.* + +val Case3.listOf: A + get() = A() + +fun listOf(vararg elements1: T): List = TODO() +private fun Case3.listOf(vararg elements1: T): List = TODO() + +// FILE: Lib.kt +package libPackageCase3Explicit + +public fun listOf(vararg elements1: T): List = TODO() + +// FILE: LibtestsPack.kt +package testsCase3 + +public fun listOf(vararg elements1: T): List = TODO() diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt index 374aef087ea..06d2154134b 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt @@ -1,7 +1,7 @@ /* * KOTLIN PSI SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Real literals with not allowed several exponent marks. diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt index 7ad7181e063..029b8c4ba87 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt @@ -1,7 +1,7 @@ /* * KOTLIN PSI SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 2 * DESCRIPTION: Real literals suffixed by f/F (the float suffix) with not allowed several exponent marks. diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt index 9349ed40c8b..539da515b70 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt @@ -1,7 +1,7 @@ /* * KOTLIN PSI SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 3 * DESCRIPTION: Real literals with a not allowed exponent mark with digits followed by a float suffix. diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt index 166d619244f..e3221716698 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt @@ -1,7 +1,7 @@ /* * KOTLIN PSI SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 4 * DESCRIPTION: Real literals with a not allowed digits and exponent mark followed by a float suffix. diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt index f8b6c127f74..db714a02c81 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt @@ -1,7 +1,7 @@ /* * KOTLIN PSI SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Simple real literals with an exponent mark. diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt index e34bf74aa67..156a8b872eb 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt @@ -1,7 +1,7 @@ /* * KOTLIN PSI SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 2 * DESCRIPTION: Real literals with a not allowed exponent mark at the beginning. diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.3.kt b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.3.kt index 7417fb40a4b..4733bd3de87 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.3.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.3.kt @@ -1,7 +1,7 @@ /* * KOTLIN PSI SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 3 * DESCRIPTION: Real literals without digits after an exponent mark. diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.4.kt b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.4.kt index 8221bf73224..cfad6ff2231 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.4.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.4.kt @@ -1,7 +1,7 @@ /* * KOTLIN PSI SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 4 * DESCRIPTION: Simple real literals suffixed by f/F (float suffix) with an exponent mark. diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.5.kt b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.5.kt index c6bb3e100c6..1df4669e7f9 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.5.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.5.kt @@ -1,7 +1,7 @@ /* * KOTLIN PSI SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 5 * DESCRIPTION: Real literals suffixed by f/F (float suffix) with a not allowed exponent mark at the beginning. diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.6.kt b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.6.kt index 054f5c70cea..23717125596 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.6.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.6.kt @@ -1,7 +1,7 @@ /* * KOTLIN PSI SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-100 + * SPEC VERSION: 0.1-435 * MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 6 * DESCRIPTION: Real literals suffixed by f/F (float suffix) with an exponent mark without digits after it. diff --git a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/testsMap.json b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/testsMap.json index 1077094a8f1..6906d777cee 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/testsMap.json +++ b/compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/testsMap.json @@ -413,7 +413,7 @@ "neg": { "1": [ { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Real literals suffixed by f/F (the float suffix) with not allowed several exponent marks.", "path": "compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt", @@ -421,7 +421,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Real literals with a not allowed exponent mark with digits followed by a float suffix.", "path": "compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt", @@ -429,7 +429,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Real literals with a not allowed digits and exponent mark followed by a float suffix.", "path": "compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt", @@ -437,7 +437,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Real literals with not allowed several exponent marks.", "path": "compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt", @@ -449,7 +449,7 @@ "pos": { "1": [ { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Real literals suffixed by f/F (float suffix) with an exponent mark without digits after it.", "path": "compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.6.kt", @@ -457,7 +457,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Real literals with a not allowed exponent mark at the beginning.", "path": "compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt", @@ -465,7 +465,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Real literals without digits after an exponent mark.", "path": "compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.3.kt", @@ -473,7 +473,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Simple real literals suffixed by f/F (float suffix) with an exponent mark.", "path": "compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.4.kt", @@ -481,7 +481,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Real literals suffixed by f/F (float suffix) with a not allowed exponent mark at the beginning.", "path": "compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.5.kt", @@ -489,7 +489,7 @@ "linkType": "main" }, { - "specVersion": "0.1-100", + "specVersion": "0.1-435", "casesNumber": 0, "description": "Simple real literals with an exponent mark.", "path": "compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt", diff --git a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/12.1.txt b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/12.1.txt deleted file mode 100644 index c56076d4fbc..00000000000 --- a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/12.1.txt +++ /dev/null @@ -1,160 +0,0 @@ -KtFile: 12.1.kt - PACKAGE_DIRECTIVE - - IMPORT_LIST - - FUN - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('case_1') - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - WHEN - PsiElement(when)('when') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('value') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - WHEN_ENTRY - PsiElement(else)('else') - PsiWhiteSpace(' ') - PsiElement(ARROW)('->') - PsiErrorElement:Expecting an element - - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - WHEN - PsiElement(when)('when') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('value') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - WHEN_ENTRY - PsiElement(else)('else') - PsiWhiteSpace(' ') - PsiElement(ARROW)('->') - PsiErrorElement:Expecting an element - - PsiWhiteSpace('\n ') - WHEN_ENTRY - PsiElement(else)('else') - PsiWhiteSpace(' ') - PsiElement(ARROW)('->') - PsiErrorElement:Expecting an element - - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - WHEN - PsiElement(when)('when') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('value') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - WHEN_ENTRY - WHEN_CONDITION_WITH_EXPRESSION - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - PsiElement(ARROW)('->') - PsiWhiteSpace(' ') - CALL_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('println') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - STRING_TEMPLATE - PsiElement(OPEN_QUOTE)('"') - LITERAL_STRING_TEMPLATE_ENTRY - PsiElement(REGULAR_STRING_PART)('1') - PsiElement(CLOSING_QUOTE)('"') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - WHEN_ENTRY - WHEN_CONDITION_WITH_EXPRESSION - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('2') - PsiWhiteSpace(' ') - PsiElement(ARROW)('->') - PsiWhiteSpace(' ') - CALL_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('println') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - STRING_TEMPLATE - PsiElement(OPEN_QUOTE)('"') - LITERAL_STRING_TEMPLATE_ENTRY - PsiElement(REGULAR_STRING_PART)('2') - PsiElement(CLOSING_QUOTE)('"') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - WHEN_ENTRY - PsiElement(else)('else') - PsiWhiteSpace(' ') - PsiElement(ARROW)('->') - PsiErrorElement:Expecting an element - - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - WHEN - PsiElement(when)('when') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('value') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - WHEN_ENTRY - WHEN_CONDITION_WITH_EXPRESSION - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - PsiElement(ARROW)('->') - PsiWhiteSpace(' ') - CALL_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('println') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - STRING_TEMPLATE - PsiElement(OPEN_QUOTE)('"') - LITERAL_STRING_TEMPLATE_ENTRY - PsiElement(REGULAR_STRING_PART)('!') - PsiElement(CLOSING_QUOTE)('"') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - WHEN_ENTRY - PsiElement(else)('else') - PsiWhiteSpace(' ') - PsiElement(ARROW)('->') - PsiErrorElement:Expecting an element - - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n') - PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/9.1.kt b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/5.1.kt similarity index 91% rename from compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/9.1.kt rename to compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/5.1.kt index 33776ba98c6..51c48edce50 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/9.1.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/5.1.kt @@ -1,8 +1,8 @@ /* * KOTLIN PSI SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-201 - * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 9 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 5 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and not allowed spread operator in 'when condition'. */ diff --git a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/8.1.txt b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/5.1.txt similarity index 99% rename from compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/8.1.txt rename to compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/5.1.txt index 2fcc4b1e3cb..0d65c3d3aed 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/8.1.txt +++ b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/5.1.txt @@ -1,4 +1,4 @@ -KtFile: 8.1.kt +KtFile: 5.1.kt PACKAGE_DIRECTIVE IMPORT_LIST diff --git a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/12.1.kt b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/7.1.kt similarity index 92% rename from compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/12.1.kt rename to compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/7.1.kt index 3f4a1c1361d..4ef95285e6b 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/12.1.kt +++ b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/7.1.kt @@ -1,8 +1,8 @@ /* * KOTLIN PSI SPEC TEST (NEGATIVE) * - * SPEC VERSION: 0.1-201 - * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 12 + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 7 * NUMBER: 1 * DESCRIPTION: 'When' with invalid else condition. */ diff --git a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/11.1.txt b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/7.1.txt similarity index 99% rename from compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/11.1.txt rename to compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/7.1.txt index 67b389a878d..5132f93b5db 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/11.1.txt +++ b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/7.1.txt @@ -1,4 +1,4 @@ -KtFile: 11.1.kt +KtFile: 7.1.kt PACKAGE_DIRECTIVE IMPORT_LIST diff --git a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/9.1.txt b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/9.1.txt deleted file mode 100644 index 14927472c2c..00000000000 --- a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/9.1.txt +++ /dev/null @@ -1,138 +0,0 @@ -KtFile: 9.1.kt - PACKAGE_DIRECTIVE - - IMPORT_LIST - - FUN - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('case_1') - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - WHEN - PsiElement(when)('when') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('value') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - WHEN_ENTRY - WHEN_CONDITION_WITH_EXPRESSION - PsiErrorElement:Expecting an expression - - PsiErrorElement:Expecting '->' - PsiElement(MUL)('*') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - WHEN_ENTRY - WHEN_CONDITION_WITH_EXPRESSION - PsiErrorElement:Expecting an expression, is-condition or in-condition - - PsiElement(ARROW)('->') - PsiWhiteSpace(' ') - RETURN - PsiElement(return)('return') - PsiWhiteSpace(' ') - STRING_TEMPLATE - PsiElement(OPEN_QUOTE)('"') - PsiElement(CLOSING_QUOTE)('"') - PsiWhiteSpace('\n ') - WHEN_ENTRY - WHEN_CONDITION_WITH_EXPRESSION - PsiErrorElement:Expecting an expression - - PsiErrorElement:Expecting '->' - PsiElement(MUL)('*') - CALL_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('arrayOf') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - STRING_TEMPLATE - PsiElement(OPEN_QUOTE)('"') - LITERAL_STRING_TEMPLATE_ENTRY - PsiElement(REGULAR_STRING_PART)('a') - PsiElement(CLOSING_QUOTE)('"') - PsiElement(COMMA)(',') - PsiWhiteSpace(' ') - VALUE_ARGUMENT - STRING_TEMPLATE - PsiElement(OPEN_QUOTE)('"') - LITERAL_STRING_TEMPLATE_ENTRY - PsiElement(REGULAR_STRING_PART)('b') - PsiElement(CLOSING_QUOTE)('"') - PsiElement(COMMA)(',') - PsiWhiteSpace(' ') - VALUE_ARGUMENT - STRING_TEMPLATE - PsiElement(OPEN_QUOTE)('"') - LITERAL_STRING_TEMPLATE_ENTRY - PsiElement(REGULAR_STRING_PART)('c') - PsiElement(CLOSING_QUOTE)('"') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - WHEN_ENTRY - WHEN_CONDITION_WITH_EXPRESSION - PsiErrorElement:Expecting an expression, is-condition or in-condition - - PsiElement(ARROW)('->') - PsiWhiteSpace(' ') - RETURN - PsiElement(return)('return') - PsiWhiteSpace(' ') - STRING_TEMPLATE - PsiElement(OPEN_QUOTE)('"') - PsiElement(CLOSING_QUOTE)('"') - PsiWhiteSpace('\n ') - WHEN_ENTRY - WHEN_CONDITION_WITH_EXPRESSION - PsiErrorElement:Expecting an expression - - PsiErrorElement:Expecting '->' - PsiElement(MUL)('*') - CALL_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('listOf') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - NULL - PsiElement(null)('null') - PsiElement(COMMA)(',') - PsiWhiteSpace(' ') - VALUE_ARGUMENT - NULL - PsiElement(null)('null') - PsiElement(COMMA)(',') - PsiWhiteSpace(' ') - VALUE_ARGUMENT - NULL - PsiElement(null)('null') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - WHEN_ENTRY - WHEN_CONDITION_WITH_EXPRESSION - PsiErrorElement:Expecting an expression, is-condition or in-condition - - PsiElement(ARROW)('->') - PsiWhiteSpace(' ') - RETURN - PsiElement(return)('return') - PsiWhiteSpace(' ') - STRING_TEMPLATE - PsiElement(OPEN_QUOTE)('"') - PsiElement(CLOSING_QUOTE)('"') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n') - PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/testsMap.json b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/testsMap.json index be99801a6bd..c4deddcca5c 100644 --- a/compiler/tests-spec/testData/psi/linked/expressions/when-expression/testsMap.json +++ b/compiler/tests-spec/testData/psi/linked/expressions/when-expression/testsMap.json @@ -1,16 +1,6 @@ { "6": { "neg": { - "12": [ - { - "specVersion": "0.1-201", - "casesNumber": 0, - "description": "\u0027When\u0027 with invalid else condition.", - "path": "compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/12.1.kt", - "unexpectedBehaviour": false, - "linkType": "main" - } - ], "1": [ { "specVersion": "0.1-296", @@ -39,12 +29,22 @@ "linkType": "main" } ], - "9": [ + "5": [ { - "specVersion": "0.1-201", + "specVersion": "0.1-435", "casesNumber": 0, "description": "\u0027When\u0027 with bound value and not allowed spread operator in \u0027when condition\u0027.", - "path": "compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/9.1.kt", + "path": "compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/5.1.kt", + "unexpectedBehaviour": false, + "linkType": "main" + } + ], + "7": [ + { + "specVersion": "0.1-435", + "casesNumber": 0, + "description": "\u0027When\u0027 with invalid else condition.", + "path": "compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/7.1.kt", "unexpectedBehaviour": false, "linkType": "main" } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java index 49a2ce357ac..44cdcc695e3 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java @@ -2927,19 +2927,19 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } - @TestMetadata("10.1.kt") - public void test10_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.1.kt"); + @TestMetadata("11.1.kt") + public void test11_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.kt"); } - @TestMetadata("10.2.kt") - public void test10_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.2.kt"); + @TestMetadata("11.2.kt") + public void test11_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.2.kt"); } - @TestMetadata("10.3.kt") - public void test10_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.3.kt"); + @TestMetadata("11.3.kt") + public void test11_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.3.kt"); } @TestMetadata("1.1.kt") @@ -2957,9 +2957,9 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.kt"); } - @TestMetadata("6.1.kt") - public void test6_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt"); + @TestMetadata("9.1.kt") + public void test9_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/9.1.kt"); } public void testAllFilesPresentInNeg() throws Exception { @@ -2980,14 +2980,19 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.1.kt"); } - @TestMetadata("10.2.kt") - public void test10_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.2.kt"); + @TestMetadata("11.1.kt") + public void test11_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt"); } - @TestMetadata("10.3.kt") - public void test10_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.3.kt"); + @TestMetadata("11.2.kt") + public void test11_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.2.kt"); + } + + @TestMetadata("11.3.kt") + public void test11_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.3.kt"); } @TestMetadata("1.1.kt") @@ -3010,14 +3015,9 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt"); } - @TestMetadata("6.1.kt") - public void test6_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt"); - } - - @TestMetadata("8.1.kt") - public void test8_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt"); + @TestMetadata("7.1.kt") + public void test7_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt"); } public void testAllFilesPresentInPos() throws Exception { @@ -3273,16 +3273,6 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } - @TestMetadata("11.1.kt") - public void test11_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/11.1.kt"); - } - - @TestMetadata("12.1.kt") - public void test12_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/12.1.kt"); - } - @TestMetadata("1.1.kt") public void test1_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/1.1.kt"); @@ -3308,6 +3298,11 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.1.kt"); } + @TestMetadata("7.2.kt") + public void test7_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.2.kt"); + } + public void testAllFilesPresentInNeg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @@ -3321,26 +3316,6 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } - @TestMetadata("10.1.kt") - public void test10_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.1.kt"); - } - - @TestMetadata("10.2.kt") - public void test10_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.2.kt"); - } - - @TestMetadata("11.1.kt") - public void test11_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/11.1.kt"); - } - - @TestMetadata("12.1.kt") - public void test12_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/12.1.kt"); - } - @TestMetadata("1.1.kt") public void test1_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.1.kt"); @@ -3371,11 +3346,31 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/3.2.kt"); } + @TestMetadata("5.1.kt") + public void test5_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt"); + } + + @TestMetadata("5.2.kt") + public void test5_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt"); + } + + @TestMetadata("6.1.kt") + public void test6_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.kt"); + } + @TestMetadata("7.1.kt") public void test7_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/7.1.kt"); } + @TestMetadata("7.2.kt") + public void test7_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/7.2.kt"); + } + public void testAllFilesPresentInPos() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @@ -3688,6 +3683,32 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } } } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_5 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInP_5() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } + } } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-specified-type-parameters") diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/FirDiagnosticsTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/FirDiagnosticsTestSpecGenerated.java index baf266aeefb..538f4c7cd21 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/FirDiagnosticsTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/FirDiagnosticsTestSpecGenerated.java @@ -2927,19 +2927,19 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } - @TestMetadata("10.1.kt") - public void test10_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.1.kt"); + @TestMetadata("11.1.kt") + public void test11_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.kt"); } - @TestMetadata("10.2.kt") - public void test10_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.2.kt"); + @TestMetadata("11.2.kt") + public void test11_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.2.kt"); } - @TestMetadata("10.3.kt") - public void test10_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/10.3.kt"); + @TestMetadata("11.3.kt") + public void test11_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.3.kt"); } @TestMetadata("1.1.kt") @@ -2957,9 +2957,9 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.kt"); } - @TestMetadata("6.1.kt") - public void test6_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt"); + @TestMetadata("9.1.kt") + public void test9_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/9.1.kt"); } public void testAllFilesPresentInNeg() throws Exception { @@ -2980,14 +2980,19 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.1.kt"); } - @TestMetadata("10.2.kt") - public void test10_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.2.kt"); + @TestMetadata("11.1.kt") + public void test11_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt"); } - @TestMetadata("10.3.kt") - public void test10_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/10.3.kt"); + @TestMetadata("11.2.kt") + public void test11_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.2.kt"); + } + + @TestMetadata("11.3.kt") + public void test11_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.3.kt"); } @TestMetadata("1.1.kt") @@ -3010,14 +3015,9 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt"); } - @TestMetadata("6.1.kt") - public void test6_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt"); - } - - @TestMetadata("8.1.kt") - public void test8_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt"); + @TestMetadata("7.1.kt") + public void test7_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt"); } public void testAllFilesPresentInPos() throws Exception { @@ -3273,16 +3273,6 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } - @TestMetadata("11.1.kt") - public void test11_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/11.1.kt"); - } - - @TestMetadata("12.1.kt") - public void test12_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/12.1.kt"); - } - @TestMetadata("1.1.kt") public void test1_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/1.1.kt"); @@ -3308,6 +3298,11 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.1.kt"); } + @TestMetadata("7.2.kt") + public void test7_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.2.kt"); + } + public void testAllFilesPresentInNeg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @@ -3321,26 +3316,6 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } - @TestMetadata("10.1.kt") - public void test10_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.1.kt"); - } - - @TestMetadata("10.2.kt") - public void test10_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/10.2.kt"); - } - - @TestMetadata("11.1.kt") - public void test11_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/11.1.kt"); - } - - @TestMetadata("12.1.kt") - public void test12_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/12.1.kt"); - } - @TestMetadata("1.1.kt") public void test1_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.1.kt"); @@ -3371,11 +3346,31 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/3.2.kt"); } + @TestMetadata("5.1.kt") + public void test5_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt"); + } + + @TestMetadata("5.2.kt") + public void test5_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt"); + } + + @TestMetadata("6.1.kt") + public void test6_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/6.1.kt"); + } + @TestMetadata("7.1.kt") public void test7_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/7.1.kt"); } + @TestMetadata("7.2.kt") + public void test7_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/7.2.kt"); + } + public void testAllFilesPresentInPos() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @@ -3688,6 +3683,32 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS } } } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_5 extends AbstractFirDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInP_5() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractFirDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } + } } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-specified-type-parameters") diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java index 7d66ac532ba..2af30ee136e 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java @@ -3609,19 +3609,19 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers"), Pattern.compile("^(.+)\\.kt$"), null, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class P_5 extends AbstractBlackBoxCodegenTestSpec { + public static class P_6 extends AbstractBlackBoxCodegenTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } - public void testAllFilesPresentInP_5() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + public void testAllFilesPresentInP_6() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } - @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos") + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractBlackBoxCodegenTestSpec { @@ -3631,31 +3631,31 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes @TestMetadata("2.1.kt") public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/2.1.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/2.1.kt"); } @TestMetadata("2.2.kt") public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/2.2.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/2.2.kt"); } @TestMetadata("3.1.kt") public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/3.1.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/3.1.kt"); } @TestMetadata("4.2.kt") public void test4_2() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/4.2.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/4.2.kt"); } @TestMetadata("5.1.kt") public void test5_1() throws Exception { - runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/5.1.kt"); + runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos/5.1.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java index a889b6a6dbf..cb634e57781 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java @@ -1150,11 +1150,6 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { KotlinTestUtils.runTest(this::doParsingTest, this, testDataFilePath); } - @TestMetadata("12.1.kt") - public void test12_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/12.1.kt"); - } - @TestMetadata("1.1.kt") public void test1_1() throws Exception { runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/1.1.kt"); @@ -1170,9 +1165,14 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/3.1.kt"); } - @TestMetadata("9.1.kt") - public void test9_1() throws Exception { - runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/9.1.kt"); + @TestMetadata("5.1.kt") + public void test5_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/5.1.kt"); + } + + @TestMetadata("7.1.kt") + public void test7_1() throws Exception { + runTest("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg/7.1.kt"); } public void testAllFilesPresentInNeg() throws Exception {