[Spec tests] Update spec version
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+11
-11
@@ -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",
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+6
-6
@@ -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",
|
||||
|
||||
+2
@@ -1,6 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Boolean?): String = when(value_1) {
|
||||
true -> ""
|
||||
+2
-2
@@ -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.
|
||||
*/
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: SealedClass?): String = when(value_1) {
|
||||
is SealedChild1 -> ""
|
||||
+2
-2
@@ -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
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: EnumClass?): String = when(value_1) {
|
||||
EnumClass.EAST -> ""
|
||||
+2
-2
@@ -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
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: SealedClass): String = when(value_1) {
|
||||
is SealedChild1 -> ""
|
||||
+2
-2
@@ -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
|
||||
+10
-10
@@ -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 -> ""
|
||||
}
|
||||
|
||||
+25
@@ -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 -> ""
|
||||
}
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: EnumClass?): String = when (value_1) {
|
||||
EnumClass.EAST -> ""
|
||||
+2
-2
@@ -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
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: SealedClass?): Int = when (value_1) {
|
||||
is SealedChild1 -> value_1.number
|
||||
+2
-2
@@ -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
|
||||
+1
@@ -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
|
||||
+2
-2
@@ -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
|
||||
-25
@@ -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 -> ""
|
||||
}
|
||||
+163
-161
@@ -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",
|
||||
|
||||
Vendored
-35
@@ -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<Int>): String {
|
||||
when (value_1) {
|
||||
<!EXPRESSION_EXPECTED!>while (false) {}<!> -> return ""
|
||||
<!EXPRESSION_EXPECTED!>do {} while (false)<!> -> return ""
|
||||
<!EXPRESSION_EXPECTED!>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) {
|
||||
<!ASSIGNMENT_IN_EXPRESSION_CONTEXT!>value_2 = 10<!> -> return ""
|
||||
<!ASSIGNMENT_IN_EXPRESSION_CONTEXT!>value_3 %= 10<!> -> return ""
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int): String = when {
|
||||
else -> ""
|
||||
+3
-3
@@ -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.
|
||||
*/
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Any?) {
|
||||
when (value_1) {
|
||||
+2
-2
@@ -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
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Any?) {
|
||||
when (value_1) {
|
||||
+2
-2
@@ -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
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int): String {
|
||||
while (true) {
|
||||
+2
-2
@@ -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'.
|
||||
*/
|
||||
Vendored
-5
@@ -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
|
||||
+3
-3
@@ -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.
|
||||
*/
|
||||
|
||||
+62
-76
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
+111
@@ -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() {
|
||||
<!DEBUG_INFO_CALL("fqName: libPackageCase1.listOf; typeCall: extension function")!>listOf(elements1= arrayOf(1))<!>
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libPackageCase1
|
||||
import testsCase1.*
|
||||
|
||||
public fun <T> listOf(vararg elements1: T): List<T> = TODO()
|
||||
fun <T> Case1.listOf(vararg elements1: T): List<T> = TODO()
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libPackageCase1Explicit
|
||||
|
||||
public fun <T> listOf(vararg elements1: T): List<T> = TODO()
|
||||
|
||||
// FILE: LibtestsPack.kt
|
||||
package testsCase1
|
||||
|
||||
public fun <T> listOf(vararg elements1: T): List<T> = TODO()
|
||||
|
||||
|
||||
// FILE: TestCase.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase2
|
||||
import libPackageCase2.*
|
||||
import libPackageCase2Explicit.listOf
|
||||
|
||||
class Case2(){
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: libPackageCase2.listOf; typeCall: extension function")!>listOf(elements1= arrayOf(1))<!>
|
||||
}
|
||||
}
|
||||
class A {
|
||||
operator fun <T>invoke(vararg elements1: T): List<T> = TODO()
|
||||
}
|
||||
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libPackageCase2
|
||||
import testsCase2.*
|
||||
|
||||
val Case2.listOf: A
|
||||
get() = A()
|
||||
|
||||
public fun <T> listOf(vararg elements1: T): List<T> = TODO()
|
||||
fun <T> Case2.listOf(vararg elements1: T): List<T> = TODO()
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libPackageCase2Explicit
|
||||
|
||||
public fun <T> listOf(vararg elements1: T): List<T> = TODO()
|
||||
|
||||
// FILE: LibtestsPack.kt
|
||||
package testsCase2
|
||||
|
||||
public fun <T> listOf(vararg elements1: T): List<T> = TODO()
|
||||
|
||||
|
||||
// FILE: TestCase.kt
|
||||
// TESTCASE NUMBER: 3
|
||||
package testsCase3
|
||||
import libPackageCase3.*
|
||||
import libPackageCase3Explicit.listOf
|
||||
|
||||
class Case3(){
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>listOf(elements1= arrayOf(1))<!>
|
||||
}
|
||||
}
|
||||
class A {
|
||||
operator fun <T>invoke(vararg elements1: T): List<T> = TODO()
|
||||
}
|
||||
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libPackageCase3
|
||||
import testsCase3.*
|
||||
|
||||
val Case3.listOf: A
|
||||
get() = A()
|
||||
|
||||
fun <T> listOf(vararg elements1: T): List<T> = TODO()
|
||||
private fun <T> Case3.listOf(vararg elements1: T): List<T> = TODO()
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libPackageCase3Explicit
|
||||
|
||||
public fun <T> listOf(vararg elements1: T): List<T> = TODO()
|
||||
|
||||
// FILE: LibtestsPack.kt
|
||||
package testsCase3
|
||||
|
||||
public fun <T> listOf(vararg elements1: T): List<T> = TODO()
|
||||
Reference in New Issue
Block a user