diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.fir.kt index 55a95cd8b2b..fbf2e9f05b8 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.fir.kt @@ -9,17 +9,17 @@ package testPackCase1 fun case1(a: A, c: C) { - a?.b += c - a?.b .plusAssign(c) + a?.b += c + a?.b .plusAssign(c) val x = { - a?.b += c - a?.b.plusAssign(c) + a?.b += c + a?.b.plusAssign(c) }() - a?.b += { c }() + a?.b += { c }() - a?.b.plusAssign({ c }()) + a?.b.plusAssign({ c }()) } class A(val b: B) diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules/testsMap.json index e98ccccbb55..439fcff9f6b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules/testsMap.json @@ -1,5 +1,28 @@ { "2": { + "pos": { + "1": [ + { + "specVersion": "0.1-464", + "casesNumber": 2, + "description": "Check of Nothing as a subtype of any type", + "path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt", + "unexpectedBehaviour": false, + "linkType": "primary", + "helpers": "checkType, functions" + } + ], + "3": [ + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Kt10811", + "path": "compiler/testData/diagnostics/tests/when/kt10811.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + } + ] + }, "neg": { "1": [ { @@ -11,18 +34,6 @@ "linkType": "primary" } ] - }, - "pos": { - "3": [ - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Kt10811", - "path": "compiler/testData/diagnostics/tests/when/kt10811.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - } - ] } } } \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.fir.kt new file mode 100644 index 00000000000..ebc9c6c177a --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.fir.kt @@ -0,0 +1,23 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK +// SKIP_TXT + + +// TESTCASE NUMBER: 1 + +class Case1(val x: AT) { + + inner class C() { + fun case1a(x: Any) { + if (x is AT) { + "" + } + } + + fun case1b(x: Any) { + when (x) { + is AT -> println("at") + } + } + } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.kt new file mode 100644 index 00000000000..16636a4ce97 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.kt @@ -0,0 +1,32 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-464 + * MAIN LINK: type-system, type-contexts-and-scopes, inner-and-nested-type-contexts -> paragraph 1 -> sentence 1 + * NUMBER: 1 + * DESCRIPTION: type context for a nested type declaration of a parent type declaration does not include the type parameters of PD + * HELPERS: checkType + */ + +// TESTCASE NUMBER: 1 + +class Case1(val x: AT) { + + inner class C() { + fun case1a(x: Any) { + if (x is AT) { + "" + } + } + + fun case1b(x: Any) { + when (x) { + is AT -> println("at") + } + } + } +} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.fir.kt new file mode 100644 index 00000000000..6a9b80610f4 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.fir.kt @@ -0,0 +1,42 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK -IMPLICIT_CAST_TO_ANY +// SKIP_TXT + + +// TESTCASE NUMBER: 1 + +class Case1(val x: AT) { + + inner class C() { + fun case1a(x: Any) { + if (x is AT) { + "" + } + } + + fun case1b(x: Any) = when (x) { + is AT -> println("at") + else -> "" + } + + } +} + +// TESTCASE NUMBER: 2 + +class Case2(val x: AT) { + + inner class C() { + fun case2a(x: CharSequence) { + if (x is AT) { + "" + } + } + + fun case2b(x: CharSequence) { + when (x) { + is AT -> "" + } + } + } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.kt new file mode 100644 index 00000000000..39b55d11c30 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.kt @@ -0,0 +1,51 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK -IMPLICIT_CAST_TO_ANY +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-464 + * MAIN LINK: type-system, type-contexts-and-scopes, inner-and-nested-type-contexts -> paragraph 1 -> sentence 1 + * NUMBER: 2 + * DESCRIPTION: type context for a nested type declaration of a parent type declaration does not include the type parameters of PD + * HELPERS: checkType + */ + +// TESTCASE NUMBER: 1 + +class Case1(val x: AT) { + + inner class C() { + fun case1a(x: Any) { + if (x is AT) { + "" + } + } + + fun case1b(x: Any) = when (x) { + is AT -> println("at") + else -> "" + } + + } +} + +// TESTCASE NUMBER: 2 + +class Case2(val x: AT) { + + inner class C() { + fun case2a(x: CharSequence) { + if (x is AT) { + "" + } + } + + fun case2b(x: CharSequence) { + when (x) { + is AT -> "" + } + } + } +} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.fir.kt new file mode 100644 index 00000000000..f1ea337d1b3 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.fir.kt @@ -0,0 +1,27 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION +// SKIP_TXT + + +// TESTCASE NUMBER: 1 +class Case1(val x: AT) { + + class B(val y: AT) { + fun case1() { + val k: AT + } + } + + class C() { + fun case1(x: Any) { + when (x) { + is AT -> println("at") + else -> println("else") + } + } + } + + class D() { + fun case1(x: Any) : AT = TODO() + } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.kt new file mode 100644 index 00000000000..f7ad9352c03 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.kt @@ -0,0 +1,35 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-464 + * MAIN LINK: type-system, type-contexts-and-scopes, inner-and-nested-type-contexts -> paragraph 1 -> sentence 2 + * NUMBER: 1 + * DESCRIPTION: type context for a nested type declaration of a parent type declaration does not include the type parameters of PD + */ + +// TESTCASE NUMBER: 1 +class Case1(val x: AT) { + + class B(val y: AT) { + fun case1() { + val k: AT + } + } + + class C() { + fun case1(x: Any) { + when (x) { + is AT -> println("at") + else -> println("else") + } + } + } + + class D() { + fun case1(x: Any) : AT = TODO() + } +} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.fir.kt new file mode 100644 index 00000000000..24bc6b3ea93 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.fir.kt @@ -0,0 +1,45 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK -UNCHECKED_CAST +// SKIP_TXT + + +// TESTCASE NUMBER: 1 + +class Case1(val x: AT) { + + inner class B(val y: AT) { + fun case1a(k: AT) { + k checkType { check() } + with(k) { + this checkType { check() } + } + + } + + fun case1b() { + val k: AT = x + k checkType { check() } + + when (k) { + is AT -> { + k checkType { check() } + } + } + } + + fun case1c() { + val k: AT = x!! + + if (k is AT) { + k checkType { check() } + } + } + } + + inner class D() { + fun boo(x: Any): AT = TODO() + fun case1() { + boo("") checkType { check() } + } + } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.kt new file mode 100644 index 00000000000..ae196189434 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.kt @@ -0,0 +1,54 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK -UNCHECKED_CAST +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) + * + * SPEC VERSION: 0.1-464 + * MAIN LINK: type-system, type-contexts-and-scopes, inner-and-nested-type-contexts -> paragraph 1 -> sentence 1 + * NUMBER: 1 + * DESCRIPTION: type context for a nested type declaration of a parent type declaration does not include the type parameters of PD + * HELPERS: checkType + */ + +// TESTCASE NUMBER: 1 + +class Case1(val x: AT) { + + inner class B(val y: AT) { + fun case1a(k: AT) { + k checkType { check() } + with(k) { + this checkType { check() } + } + + } + + fun case1b() { + val k: AT = x + k checkType { check() } + + when (k) { + is AT -> { + k checkType { check() } + } + } + } + + fun case1c() { + val k: AT = x!! + + if (k is AT) { + k checkType { check() } + } + } + } + + inner class D() { + fun boo(x: Any): AT = TODO() + fun case1() { + boo("") checkType { check() } + } + } +} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.fir.kt new file mode 100644 index 00000000000..e072ba50531 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.fir.kt @@ -0,0 +1,65 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK +// SKIP_TXT + + +// TESTCASE NUMBER: 1 + +class Case1(val x: AT) { + + inner class B(val y: AT) { + fun case1a() { + val k: AT = x + + if (k is AT) { + "" + } + } + + fun case1b() { + val k: AT = x + + when (k) { + is AT -> "" + } + } + } + + inner class D() { + fun boo(x: Any): AT = TODO() + fun case1() { + boo("") checkType { check() } + } + } +} + +// TESTCASE NUMBER: 2 + +class Case2(val x: AT) { + + inner class B(val y: AT) { + fun case2a() { + val k: AT = x + + if (k is AT) { + "" + } + } + + fun case2b() { + val k: AT = x + + when (k) { + is AT -> "" + } + } + } + + + inner class C() { + fun boo(x: Any): AT = TODO() + fun case2() { + boo("") checkType { check() } + } + } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.kt new file mode 100644 index 00000000000..2c3df56d19b --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.kt @@ -0,0 +1,74 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) + * + * SPEC VERSION: 0.1-464 + * MAIN LINK: type-system, type-contexts-and-scopes, inner-and-nested-type-contexts -> paragraph 1 -> sentence 1 + * NUMBER: 2 + * DESCRIPTION: type context for a nested type declaration of a parent type declaration does not include the type parameters of PD + * HELPERS: checkType + */ + +// TESTCASE NUMBER: 1 + +class Case1(val x: AT) { + + inner class B(val y: AT) { + fun case1a() { + val k: AT = x + + if (k is AT) { + "" + } + } + + fun case1b() { + val k: AT = x + + when (k) { + is AT -> "" + } + } + } + + inner class D() { + fun boo(x: Any): AT = TODO() + fun case1() { + boo("") checkType { check() } + } + } +} + +// TESTCASE NUMBER: 2 + +class Case2(val x: AT) { + + inner class B(val y: AT) { + fun case2a() { + val k: AT = x + + if (k is AT) { + "" + } + } + + fun case2b() { + val k: AT = x + + when (k) { + is AT -> "" + } + } + } + + + inner class C() { + fun boo(x: Any): AT = TODO() + fun case2() { + boo("") checkType { check() } + } + } +} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/testsMap.json new file mode 100644 index 00000000000..7057d488537 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/testsMap.json @@ -0,0 +1,58 @@ +{ + "1": { + "neg": { + "2": [ + { + "specVersion": "0.1-464", + "casesNumber": 1, + "description": "type context for a nested type declaration of a parent type declaration does not include the type parameters of PD", + "path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.kt", + "unexpectedBehaviour": false, + "linkType": "main" + } + ], + "1": [ + { + "specVersion": "0.1-464", + "casesNumber": 2, + "description": "type context for a nested type declaration of a parent type declaration does not include the type parameters of PD", + "path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.kt", + "unexpectedBehaviour": false, + "linkType": "main", + "helpers": "checkType" + }, + { + "specVersion": "0.1-464", + "casesNumber": 1, + "description": "type context for a nested type declaration of a parent type declaration does not include the type parameters of PD", + "path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.kt", + "unexpectedBehaviour": false, + "linkType": "main", + "helpers": "checkType" + } + ] + }, + "pos": { + "1": [ + { + "specVersion": "0.1-464", + "casesNumber": 2, + "description": "type context for a nested type declaration of a parent type declaration does not include the type parameters of PD", + "path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.kt", + "unexpectedBehaviour": false, + "linkType": "main", + "helpers": "checkType" + }, + { + "specVersion": "0.1-464", + "casesNumber": 1, + "description": "type context for a nested type declaration of a parent type declaration does not include the type parameters of PD", + "path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.kt", + "unexpectedBehaviour": false, + "linkType": "main", + "helpers": "checkType" + } + ] + } + } +} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt similarity index 83% rename from compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/2.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt index 9370f556da1..311c1b7cbd7 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt @@ -6,9 +6,10 @@ /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * - * SPEC VERSION: 0.1-213 - * MAIN LINK: type-system, type-kinds, built-in-types, kotlin.nothing -> paragraph 1 -> sentence 2 - * NUMBER: 1 + * SPEC VERSION: 0.1-464 + * MAIN LINK: type-system, type-kinds, built-in-types, kotlin.nothing -> paragraph 1 -> sentence 1 + * PRIMARY LINKS: type-system, subtyping, subtyping-rules -> paragraph 2 -> sentence 1 + * NUMBER: 2 * DESCRIPTION: Check of Nothing as a subtype of any type * HELPERS: checkType, functions */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/testsMap.json index c81512db7d7..d7cee0b5a2a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/testsMap.json @@ -14,18 +14,16 @@ ] }, "pos": { - "2": [ + "1": [ { - "specVersion": "0.1-213", + "specVersion": "0.1-464", "casesNumber": 2, "description": "Check of Nothing as a subtype of any type", - "path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/2.1.kt", + "path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt", "unexpectedBehaviour": false, "linkType": "main", "helpers": "checkType, functions" - } - ], - "1": [ + }, { "specVersion": "0.1-213", "casesNumber": 2, 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 886fc6b6fb5..0c82689eb73 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 @@ -5684,6 +5684,96 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Type_contexts_and_scopes extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInType_contexts_and_scopes() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inner_and_nested_type_contexts extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInInner_and_nested_type_contexts() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/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); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } + } + } + } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -5812,9 +5902,9 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.1.kt"); } - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/2.1.kt"); + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt"); } public void testAllFilesPresentInPos() throws Exception { 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 2e29ad0ad51..04b4d4fdd6e 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 @@ -5684,6 +5684,96 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS } } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Type_contexts_and_scopes extends AbstractFirDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInType_contexts_and_scopes() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inner_and_nested_type_contexts extends AbstractFirDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInInner_and_nested_type_contexts() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractFirDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractFirDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/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); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } + } + } + } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -5812,9 +5902,9 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.1.kt"); } - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/2.1.kt"); + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt"); } public void testAllFilesPresentInPos() throws Exception {