Add 'not linked' kind of spec tests

This commit is contained in:
victor.petukhov
2018-08-28 19:06:59 +03:00
parent 841bb4f253
commit ecf8b88c4c
72 changed files with 1140 additions and 928 deletions
+31 -30
View File
@@ -9,13 +9,13 @@ Note: diagnostic tests format specification you can see in the [diagnostic tests
Each test relates to a specific section, paragraph, and sentence of the Kotlin language specification, and is either positive or negative.
The folder structure is as follows:
* `s-<sectionNumber>_<sectionName>`
* `<sectionName>`
* `p-<paragraphNumber>`
* `<neg|pos>`
* `<setenceNumber>.<testNumber>.kt` (test source code)
* `<setenceNumber>.<testNumber>.txt` (descriptors file)
Example test file path: `testsSpec/s-16.30_when-expression/p-2/neg/3.1.kt`
Example test file path: `testData/diagnostics/linked/when-expression/p-2/neg/3.1.kt`
## Positive and negative tests
@@ -35,9 +35,9 @@ A comment with meta information has the following format:
/*
KOTLIN SPEC TEST (<POSITIVE|NEGATIVE>)
SECTION <sectionNumber>: <sectionName>
SECTION: <sectionName>
PARAGRAPH: <paragraphNumber>
SENTENCE <setenceNumber>: <setence>
SENTENCE: [<setenceNumber>] <setence>
NUMBER: <testNumber>
DESCRIPTION: <testDescription>
*/
@@ -45,17 +45,17 @@ A comment with meta information has the following format:
Example:
```
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION 16.30: When expression
PARAGRAPH: 3
SENTENCE 2: Each entry consists of a boolean condition (or a special else condition), each of which is checked and evaluated in order of appearance.
SECTION: when-expression
PARAGRAPH: 2
SENTENCE: [3] When expression has two different forms: with bound value and without it.
NUMBER: 1
DESCRIPTION: 'When' with not boolean condition in 'when condition'
DESCRIPTION: Empty 'when' with bound value.
*/
```
Meta-information should be placed at the beginning of the file after diagnostic directives (if any).
Meta-information should be placed at the beginning of the file after directives (if any).
### Case description
@@ -92,23 +92,23 @@ If the validation fails, you will receive exception about it.
During the test run, the following information is displayed for each test:
```
<POSITIVE|NEGATIVE> DIAGNOSTICS SPEC TEST
SECTION: <sectionNumber> <sectionName> (paragraph: <paragraphNumber>)
SENTENCE <sentenceNumber> [<specUrl>]: <sentence>
DIAGNOSTICS <POSITIVE|NEGATIVE> SPEC TEST
SECTION: <sectionName> (paragraph: <paragraphNumber>)
SENTENCE <sentenceNumber>: <sentence>
TEST NUMBER: <testNumber>
NUMBER OF TEST CASES: <casesNumber>
TEST CASES: <casesNumber>
DESCRIPTION: <testDescription>
DIAGNOSTICS: <diagnosticSeverities> | <diagnostics>
```
Example:
```
POSITIVE DIAGNOSTICS SPEC TEST
SECTION: 16.30 When expression (paragraph: 5)
SENTENCE 1 [http://jetbrains.github.io/kotlin-spec/#when-expression:5:1]: The type of the resulting expression is the least upper bound of the types of all the entries.
TEST NUMBER: 4
NUMBER OF TEST CASES: 9
DESCRIPTION: 'When' least upper bound of the types check (when exhaustive via sealed class).
DIAGNOSTICS: {WARNING=15} | {USELESS_IS_CHECK=1, IMPLICIT_CAST_TO_ANY=14}
DIAGNOSTICS NEGATIVE SPEC TEST
SECTION: when-expression (paragraph: 3)
SENTENCE 1:
TEST NUMBER: 1
NUMBER OF TEST CASES: 3
DESCRIPTION: 'When' without bound value and not allowed break and continue expression (without labels) in the control structure body.
DIAGNOSTICS: {ERROR=2, WARNING=1} | {BREAK_OR_CONTINUE_IN_WHEN=2, UNREACHABLE_CODE=1}
```
## Statistics on specification tests
@@ -118,18 +118,19 @@ To see statistics for existing tests you can run gradle task `printSpecTestStati
Example output:
```
--------------------------------------------------
==================================================
SPEC TESTS STATISTIC
--------------------------------------------------
DIAGNOSTICS: 131 tests
16.30 WHEN-EXPRESSION: 131 tests
PARAGRAPH 2: 4 tests (neg: 2, pos: 2)
PARAGRAPH 3: 35 tests (neg: 5, pos: 30)
PARAGRAPH 4: 67 tests (neg: 11, pos: 56)
PARAGRAPH 5: 8 tests (neg: 4, pos: 4)
PARAGRAPH 6: 17 tests (neg: 8, pos: 9)
PSI: 0 tests
DIAGNOSTICS: 54 tests
when-expression: 54 tests
PARAGRAPH 9: 8 tests [ neg: 4 ] [ pos: 4 ]
PARAGRAPH 7: 16 tests [ neg: 7 ] [ pos: 9 ]
PARAGRAPH 6: 2 tests [ neg: 1 ] [ pos: 1 ]
PARAGRAPH 11: 17 tests [ neg: 8 ] [ pos: 9 ]
PARAGRAPH 3: 7 tests [ neg: 3 ] [ pos: 4 ]
PARAGRAPH 2: 2 tests [ pos: 2 ]
PARAGRAPH 5: 2 tests [ neg: 1 ] [ pos: 1 ]
CODEGEN: 0 tests
--------------------------------------------------
```
@@ -4,16 +4,16 @@ class _Class {
val prop_3 = 3
fun fun_1(): (Int) -> (Int) -> Int = {number: Int -> { number * 5 }}
fun fun_2(value: Int): Int = value * 2
fun fun_3(value1: Int): (Int) -> Int = fun(value2: Int): Int = value1 * value2 * 2
fun fun_2(value_1: Int): Int = value_1 * 2
fun fun_3(value_1: Int): (Int) -> Int = fun(value_2: Int): Int = value_1 * value_2 * 2
operator fun contains(a: Int): Boolean = a > 30
operator fun contains(a: Long): Boolean = a > 30L
operator fun contains(a: Char): Boolean = a > 30.toChar()
fun getIntArray(value: Int): IntArray = intArrayOf(1, 2, 3, value, 91923, 14, 123124)
fun getLongArray(value: Long): LongArray = longArrayOf(1L, 2L, 3L, value, 9192323244L, 14L, 123124L)
fun getCharArray(value: Char): CharArray = charArrayOf(1.toChar(), 2.toChar(), 3.toChar(), value)
fun getIntArray(value_1: Int): IntArray = intArrayOf(1, 2, 3, value_1, 91923, 14, 123124)
fun getLongArray(value_1: Long): LongArray = longArrayOf(1L, 2L, 3L, value_1, 9192323244L, 14L, 123124L)
fun getCharArray(value_1: Char): CharArray = charArrayOf(1.toChar(), 2.toChar(), 3.toChar(), value_1)
class _NestedClass {
val prop_4 = 4
@@ -0,0 +1,7 @@
fun _funWithoutArgs(): Int {
return Any().hashCode().toInt()
}
fun _funWithAnyArg(value_1: Any): Int {
return value_1.hashCode()
}
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [1] It has an else entry;
NUMBER: 1
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [1] It has an else entry;
NUMBER: 2
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [3] The bound expression is of type kotlin.Boolean and the conditions contain both:
NUMBER: 1
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [6] The bound expression is of a sealed class type and all its possible subtypes are covered using type test conditions of this expression;
NUMBER: 1
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [7] The bound expression is of an Enum classes type and all enumerated values are checked for equality using constant conditions;
NUMBER: 1
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [8] The bound expression is of a nullable type and one of the cases above is met for its non-nullable counterpart and, in addition, there is a condition containing literal null.
NUMBER: 1
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [8] The bound expression is of a nullable type and one of the cases above is met for its non-nullable counterpart and, in addition, there is a condition containing literal null.
NUMBER: 2
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [8] The bound expression is of a nullable type and one of the cases above is met for its non-nullable counterpart and, in addition, there is a condition containing literal null.
NUMBER: 3
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [1] It has an else entry;
NUMBER: 1
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [1] It has an else entry;
NUMBER: 2
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [1] It has an else entry;
NUMBER: 3
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [3] The bound expression is of type kotlin.Boolean and the conditions contain both:
NUMBER: 1
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When valueession
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [6] The bound valueession is of a sealed class type and all its possible subtypes are covered using type test conditions of this valueession;
NUMBER: 1
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [7] The bound expression is of an Enum classes type and all enumerated values are checked for equality using constant conditions;
NUMBER: 1
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [8] The bound expression is of a nullable type and one of the cases above is met for its non-nullable counterpart and, in addition, there is a condition containing literal null.
NUMBER: 1
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [8] The bound expression is of a nullable type and one of the cases above is met for its non-nullable counterpart and, in addition, there is a condition containing literal null.
NUMBER: 2
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 11
SENTENCE: [8] The bound expression is of a nullable type and one of the cases above is met for its non-nullable counterpart and, in addition, there is a condition containing literal null.
NUMBER: 3
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 2
SENTENCE: [3] When expression has two different forms: with bound value and without it.
NUMBER: 1
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 2
SENTENCE: [3] When expression has two different forms: with bound value and without it.
NUMBER: 2
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 3
SENTENCE: [1] When expression without bound value (the form where the expression enclosed in parantheses is absent) evaluates one of the many different expressions based on corresponding conditions present in the same when entry.
NUMBER: 1
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 3
SENTENCE: [2] Each entry consists of a boolean condition (or a special else condition), each of which is checked and evaluated in order of appearance.
NUMBER: 1
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 3
SENTENCE: [2] Each entry consists of a boolean condition (or a special else condition), each of which is checked and evaluated in order of appearance.
NUMBER: 2
@@ -1,12 +1,12 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION -DEBUG_INFO_SMARTCAST
// !WITH_BASIC_TYPES
// !WITH_CLASSES
// !WITH_FUNS
// !WITH_FUNCTIONS
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 3
SENTENCE: [1] When expression without bound value (the form where the expression enclosed in parantheses is absent) evaluates one of the many different expressions based on corresponding conditions present in the same when entry.
NUMBER: 1
@@ -5,7 +5,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 3
SENTENCE: [2] Each entry consists of a boolean condition (or a special else condition), each of which is checked and evaluated in order of appearance.
NUMBER: 1
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 3
SENTENCE: [2] Each entry consists of a boolean condition (or a special else condition), each of which is checked and evaluated in order of appearance.
NUMBER: 2
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 3
SENTENCE: [2] Each entry consists of a boolean condition (or a special else condition), each of which is checked and evaluated in order of appearance.
NUMBER: 3
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 5
SENTENCE: [1] The else entry is also special in the sense that it must be the last entry in the expression, otherwise a compiler error must be generated.
NUMBER: 1
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 5
SENTENCE: [1] The else entry is also special in the sense that it must be the last entry in the expression, otherwise a compiler error must be generated.
NUMBER: 1
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 6
SENTENCE: [1] When expression with bound value (the form where the expression enclosed in parantheses is present) are very similar to the form without bound value, but use different syntax for conditions.
NUMBER: 1
@@ -1,12 +1,12 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION
// !WITH_BASIC_TYPES
// !WITH_FUNS
// !WITH_FUNCTIONS
// !WITH_CLASSES
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 6
SENTENCE: [1] When expression with bound value (the form where the expression enclosed in parantheses is present) are very similar to the form without bound value, but use different syntax for conditions.
NUMBER: 1
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [1] Type test condition: type checking operator followed by type.
NUMBER: 1
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [1] Type test condition: type checking operator followed by type.
NUMBER: 2
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [3] Contains test condition: containment operator followed by an expression.
NUMBER: 1
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [3] Contains test condition: containment operator followed by an expression.
NUMBER: 2
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [5] Any other expression.
NUMBER: 1
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [5] Any other expression.
NUMBER: 2
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [7] The else condition, which works the exact same way as it would in the form without bound expression.
NUMBER: 1
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [1] Type test condition: type checking operator followed by type.
NUMBER: 1
@@ -5,7 +5,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [1] Type test condition: type checking operator followed by type.
NUMBER: 2
@@ -5,7 +5,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [1] Type test condition: type checking operator followed by type.
NUMBER: 3
@@ -3,7 +3,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [1] Type test condition: type checking operator followed by type.
NUMBER: 4
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [3] Contains test condition: containment operator followed by an expression.
NUMBER: 1
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [3] Contains test condition: containment operator followed by an expression.
NUMBER: 2
@@ -1,11 +1,11 @@
// !WITH_BASIC_TYPES
// !WITH_FUNS
// !WITH_FUNCTIONS
// !WITH_CLASSES
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [5] Any other expression.
NUMBER: 1
@@ -1,11 +1,11 @@
// !WITH_BASIC_TYPES
// !WITH_CLASSES
// !WITH_FUNS
// !WITH_FUNCTIONS
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [5] Any other expression.
NUMBER: 2
@@ -1,7 +1,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 7
SENTENCE: [7] The else condition, which works the exact same way as it would in the form without bound expression.
NUMBER: 1
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 9
SENTENCE: [1] The type of the resulting expression is the least upper bound of the types of all the entries.
NUMBER: 1
@@ -5,7 +5,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 9
SENTENCE: [1] The type of the resulting expression is the least upper bound of the types of all the entries.
NUMBER: 2
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 9
SENTENCE: [1] The type of the resulting expression is the least upper bound of the types of all the entries.
NUMBER: 3
@@ -5,7 +5,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 9
SENTENCE: [1] The type of the resulting expression is the least upper bound of the types of all the entries.
NUMBER: 4
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 9
SENTENCE: [1] The type of the resulting expression is the least upper bound of the types of all the entries.
NUMBER: 1
@@ -5,7 +5,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 9
SENTENCE: [1] The type of the resulting expression is the least upper bound of the types of all the entries.
NUMBER: 2
@@ -4,7 +4,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 9
SENTENCE: [1] The type of the resulting expression is the least upper bound of the types of all the entries.
NUMBER: 3
@@ -5,7 +5,7 @@
/*
KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
SECTION: 16.30 When expression
SECTION: when-expression
PARAGRAPH: 9
SENTENCE: [1] The type of the resulting expression is the least upper bound of the types of all the entries.
NUMBER: 4
@@ -1,3 +0,0 @@
fun _funWithoutArgs(): Int {
return Any().hashCode().toInt()
}