[Spec tests] Change metadata structure of implementation and spec tests

This commit is contained in:
anastasiia.spaseeva
2020-04-01 19:14:46 +03:00
parent 80cd26c9df
commit d32aca87d1
925 changed files with 2330 additions and 1657 deletions
@@ -1,6 +1,8 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-220, test type: pos):
* - expressions, call-and-property-access-expressions, callable-references -> paragraph 3 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-220
* PRIMARY LINKS: expressions, call-and-property-access-expressions, callable-references -> paragraph 3 -> sentence 1
*/
fun f1() = <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Map<!>::hashCode
fun f2() = <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Map.Entry<!>::hashCode
@@ -1,8 +1,10 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
// !CHECK_TYPE
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-220, test type: pos):
* - expressions, call-and-property-access-expressions, callable-references -> paragraph 11 -> sentence 3
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-220
* PRIMARY LINKS: expressions, call-and-property-access-expressions, callable-references -> paragraph 11 -> sentence 3
*/
import kotlin.reflect.KFunction0
@@ -1,9 +1,11 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-220, test type: pos):
* - expressions, call-and-property-access-expressions, navigation-operators -> paragraph 9 -> sentence 2
* - expressions, call-and-property-access-expressions, navigation-operators -> paragraph 8 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-220
* PRIMARY LINKS: expressions, call-and-property-access-expressions, navigation-operators -> paragraph 9 -> sentence 2
* expressions, call-and-property-access-expressions, navigation-operators -> paragraph 8 -> sentence 1
*/
import kotlin.reflect.KProperty1
@@ -1,10 +1,12 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 5
* - annotations, annotation-targets -> paragraph 1 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 9 -> sentence 2
* expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 5
* annotations, annotation-targets -> paragraph 1 -> sentence 1
*/
fun foo(a: Int) {
@ann
@@ -1,11 +1,13 @@
// !WITH_NEW_INFERENCE
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 1
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 6
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 1
* expressions, when-expression -> paragraph 5 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 6
*/
class A
@@ -1,11 +1,13 @@
// !WITH_NEW_INFERENCE
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 1
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 8
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 1
* expressions, when-expression -> paragraph 5 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 8
*/
class A
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - expressions, when-expression -> paragraph 6 -> sentence 1
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 8
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression -> paragraph 6 -> sentence 1
* expressions, when-expression -> paragraph 5 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 8
*/
enum class My { A, B }
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 1
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 8
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 1
* expressions, when-expression -> paragraph 5 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 8
*/
class A
@@ -1,7 +1,9 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression -> paragraph 2 -> sentence 1
* - expressions, when-expression -> paragraph 5 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 2 -> sentence 1
* expressions, when-expression -> paragraph 5 -> sentence 1
*/
fun foo(x: Int, y: Int): Int =
when {
@@ -1,9 +1,11 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 1
* - expressions, when-expression -> paragraph 2 -> sentence 4
* - expressions, when-expression -> paragraph 2 -> sentence 5
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 1
* expressions, when-expression -> paragraph 2 -> sentence 4
* expressions, when-expression -> paragraph 2 -> sentence 5
*/
package test
@@ -1,9 +1,11 @@
// KT-2902 Check for null should be required when match nullable enum element
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
*/
// FILE: 1.kt
@@ -1,8 +1,10 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
*/
enum class E { A, B }
@@ -1,10 +1,12 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 1 -> sentence 1
* - expressions, when-expression -> paragraph 1 -> sentence 2
* - expressions, when-expression -> paragraph 6 -> sentence 5
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 1 -> sentence 1
* expressions, when-expression -> paragraph 1 -> sentence 2
* expressions, when-expression -> paragraph 6 -> sentence 5
*/
// EA-68871: empty when condition
@@ -1,10 +1,12 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 1 -> sentence 1
* - expressions, when-expression -> paragraph 1 -> sentence 2
* - expressions, when-expression -> paragraph 6 -> sentence 5
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 1 -> sentence 1
* expressions, when-expression -> paragraph 1 -> sentence 2
* expressions, when-expression -> paragraph 6 -> sentence 5
*/
// EA-68871: empty when condition
@@ -1,10 +1,12 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 5
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 5
*/
// See also: KT-3743
@@ -1,10 +1,12 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 5
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 5
*/
fun foo(arg: Boolean): String {
@@ -1,10 +1,12 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 5
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 5
*/
// See also: KT-3743
@@ -1,10 +1,12 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
*/
// See also: KT-3743
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
* - control--and-data-flow-analysis, control-flow-graph, statements-1 -> paragraph 0 -> sentence 0
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
* control--and-data-flow-analysis, control-flow-graph, statements-1 -> paragraph 0 -> sentence 0
*/
enum class Color { RED, GREEN, BLUE }
@@ -1,8 +1,10 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
*/
enum class MyEnum {
@@ -1,9 +1,11 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 5
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 5
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
*/
enum class MyEnum {
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 5
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 5
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
*/
enum class Direction {
@@ -1,11 +1,13 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 5
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 5
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
*/
fun foo(b: Boolean): Int {
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
*/
enum class MyEnum {
@@ -1,7 +1,9 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
*/
// See KT-6399: exhaustive whens on platform enums
@@ -1,8 +1,10 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
*/
// See KT-6399: exhaustive whens on platform enums
@@ -1,9 +1,11 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
*/
// See KT-6399: exhaustive whens on platform enums
@@ -1,9 +1,11 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-313, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
*/
// See KT-6399: exhaustive whens on platform enums
@@ -1,7 +1,10 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 923
*/
// See KT-6399: exhaustive whens on platform enums
@@ -1,9 +1,11 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
*/
enum class Direction {
@@ -1,9 +1,11 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
*/
enum class Direction {
@@ -1,11 +1,13 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 2
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 3
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 2
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 3
*/
fun foo(a: Boolean, b: Boolean): Int {
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 2
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 2
*/
fun foo(a: Boolean, b: Boolean): Int {
@@ -1,8 +1,10 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
*/
// KT-7857: when exhaustiveness does not take previous nullability checks into account
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 1 -> sentence 1
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 1 -> sentence 1
* control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
*/
// KT-7857: when exhaustiveness does not take previous nullability checks into account
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 5
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 4
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 5
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
*/
// KT-7857: when exhaustiveness does not take previous nullability checks into account
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 1 -> sentence 1
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 1 -> sentence 1
* control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
*/
// KT-7857: when exhaustiveness does not take previous nullability checks into account
@@ -1,8 +1,10 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 2
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
*/
fun foo(x: Int) {
@@ -1,8 +1,10 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 2
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
*/
fun foo(x: Int): Any {
@@ -1,9 +1,11 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, function-literals, lambda-literals -> paragraph 10 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 2
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, function-literals, lambda-literals -> paragraph 10 -> sentence 1
*/
fun foo(x: Int) {
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, function-literals, lambda-literals -> paragraph 10 -> sentence 1
* - overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 3 -> sentence 3
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 2
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, function-literals, lambda-literals -> paragraph 10 -> sentence 1
* overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 3 -> sentence 3
*/
fun foo(x: Int) {
@@ -1,8 +1,10 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 2
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
*/
fun foo(x: Int): Any {
@@ -1,8 +1,10 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 2
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
*/
@@ -1,8 +1,10 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 2
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 2
*/
fun foo(x: Int) {
@@ -1,9 +1,11 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
*/
// See also: KT-3743
@@ -1,8 +1,10 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
*/
// See KT-6399: exhaustive whens on platform enums
@@ -1,11 +1,13 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression -> paragraph 9 -> sentence 2
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
*/
// Base for KT-6227
@@ -1,12 +1,14 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 2
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 2
*/
// Base for KT-6227
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 2
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 2
*/
// Base for KT-6227
@@ -1,12 +1,14 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 7
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 3 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 7
* expressions, when-expression -> paragraph 9 -> sentence 2
* expressions, when-expression, exhaustive-when-expressions -> paragraph 3 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
*/
sealed class S
@@ -1,13 +1,15 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
* expressions, when-expression -> paragraph 9 -> sentence 2
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
*/
// Base for KT-6227
@@ -1,10 +1,12 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - expressions, when-expression -> paragraph 9 -> sentence 2
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression -> paragraph 9 -> sentence 2
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
*/
// KT-7857: when exhaustiveness does not take previous nullability checks into account
@@ -1,11 +1,13 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* - control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 2
* - declarations, classifier-declaration, classifier-initialization -> paragraph 6 -> sentence 4
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 2 -> sentence 3
* control--and-data-flow-analysis, performing-analysis-on-the-control-flow-graph, variable-initialization-analysis -> paragraph 3 -> sentence 2
* declarations, classifier-declaration, classifier-initialization -> paragraph 6 -> sentence 4
*/
// See KT-5113
+9 -7
View File
@@ -1,11 +1,13 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* - expressions, when-expression -> paragraph 6 -> sentence 10
* - expressions, when-expression -> paragraph 6 -> sentence 11
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 9
* expressions, when-expression -> paragraph 6 -> sentence 10
* expressions, when-expression -> paragraph 6 -> sentence 11
*/
// FILE: MyEnum.java
@@ -1,8 +1,10 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 2 -> sentence 1
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 2 -> sentence 1
* expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
*/
// !DIAGNOSTICS: -UNUSED_PARAMETER
+8 -6
View File
@@ -1,11 +1,13 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 7
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 8
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 7
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 8
*/
sealed class A {
+11 -9
View File
@@ -1,14 +1,16 @@
// !WITH_NEW_INFERENCE
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 2 -> sentence 5
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 3
* - expressions, when-expression -> paragraph 6 -> sentence 5
* - expressions, when-expression -> paragraph 6 -> sentence 9
* - expressions, when-expression -> paragraph 6 -> sentence 10
* - expressions, when-expression -> paragraph 6 -> sentence 11
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 2 -> sentence 5
* expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 3
* expressions, when-expression -> paragraph 6 -> sentence 5
* expressions, when-expression -> paragraph 6 -> sentence 9
* expressions, when-expression -> paragraph 6 -> sentence 10
* expressions, when-expression -> paragraph 6 -> sentence 11
*/
fun Int.foo() : Boolean = true
@@ -1,11 +1,13 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 1
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 2 -> sentence 1
* - control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 1
* control--and-data-flow-analysis, control-flow-graph, expressions-1, conditional-expressions -> paragraph 2 -> sentence 1
* control--and-data-flow-analysis, control-flow-graph, expressions-1, boolean-operators -> paragraph 0 -> sentence 0
*/
fun foo(s: Any): String {
+9 -7
View File
@@ -1,12 +1,14 @@
// !WITH_NEW_INFERENCE
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 1
* - expressions, conditional-expression -> paragraph 4 -> sentence 1
* - expressions, conditional-expression -> paragraph 5 -> sentence 1
* - overload-resolution, determining-function-applicability-for-a-specific-call, rationale -> paragraph 1 -> sentence 1
* - overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 3 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 1
* expressions, conditional-expression -> paragraph 4 -> sentence 1
* expressions, conditional-expression -> paragraph 5 -> sentence 1
* overload-resolution, determining-function-applicability-for-a-specific-call, rationale -> paragraph 1 -> sentence 1
* overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 3 -> sentence 1
*/
fun foo(x: Int) = x
+14 -12
View File
@@ -2,18 +2,20 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -DEBUG_INFO_SMARTCAST
// NI_EXPECTED_FILE
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 1
* - expressions, when-expression -> paragraph 2 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* - expressions, conditional-expression -> paragraph 4 -> sentence 1
* - declarations, function-declaration -> paragraph 7 -> sentence 1
* - type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* - type-system, type-kinds, type-parameters -> paragraph 4 -> sentence 1
* - type-inference, local-type-inference -> paragraph 8 -> sentence 1
* - type-inference, local-type-inference -> paragraph 2 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 1
* expressions, when-expression -> paragraph 2 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* expressions, conditional-expression -> paragraph 4 -> sentence 1
* declarations, function-declaration -> paragraph 7 -> sentence 1
* type-inference, smart-casts, smart-cast-types -> paragraph 9 -> sentence 1
* type-system, type-kinds, type-parameters -> paragraph 4 -> sentence 1
* type-inference, local-type-inference -> paragraph 8 -> sentence 1
* type-inference, local-type-inference -> paragraph 2 -> sentence 1
*/
interface Data
+12 -10
View File
@@ -1,15 +1,17 @@
// FIR_IDENTICAL
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 2 -> sentence 1
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* - expressions, conditional-expression -> paragraph 4 -> sentence 1
* - type-inference, local-type-inference -> paragraph 8 -> sentence 1
* - type-inference, local-type-inference -> paragraph 2 -> sentence 1
* - type-system, subtyping, subtyping-rules -> paragraph 2 -> sentence 3
* - type-system, subtyping, subtyping-for-nullable-types -> paragraph 4 -> sentence 1
* - type-system, subtyping, subtyping-for-nullable-types -> paragraph 4 -> sentence 2
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 2 -> sentence 1
* expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* expressions, conditional-expression -> paragraph 4 -> sentence 1
* type-inference, local-type-inference -> paragraph 8 -> sentence 1
* type-inference, local-type-inference -> paragraph 2 -> sentence 1
* type-system, subtyping, subtyping-rules -> paragraph 2 -> sentence 3
* type-system, subtyping, subtyping-for-nullable-types -> paragraph 4 -> sentence 1
* type-system, subtyping, subtyping-for-nullable-types -> paragraph 4 -> sentence 2
*/
interface Maybe<T>
+7 -5
View File
@@ -1,9 +1,11 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 5 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* - expressions, when-expression -> paragraph 6 -> sentence 5
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 1 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 5
*/
// KT-4434 Missed diagnostic about else branch in when
+8 -6
View File
@@ -1,11 +1,13 @@
// !WITH_NEW_INFERENCE
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: pos):
* - expressions, when-expression -> paragraph 2 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* - expressions, when-expression -> paragraph 9 -> sentence 1
* - expressions, conditional-expression -> paragraph 4 -> sentence 1
* - expressions, conditional-expression -> paragraph 5 -> sentence 1
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 2 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* expressions, when-expression -> paragraph 9 -> sentence 1
* expressions, conditional-expression -> paragraph 4 -> sentence 1
* expressions, conditional-expression -> paragraph 5 -> sentence 1
*/
fun test1(): Int {
@@ -1,11 +1,13 @@
// !WITH_NEW_INFERENCE
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 2 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* - type-system, subtyping, subtyping-rules -> paragraph 2 -> sentence 1
* - type-inference, local-type-inference -> paragraph 2 -> sentence 1
* - overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 3 -> sentence 3
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 2 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* type-system, subtyping, subtyping-rules -> paragraph 2 -> sentence 1
* type-inference, local-type-inference -> paragraph 2 -> sentence 1
* overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 3 -> sentence 3
*/
val test1: (String) -> Boolean =
@@ -1,13 +1,15 @@
// !WITH_NEW_INFERENCE
// NI_EXPECTED_FILE
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-152, test type: neg):
* - expressions, when-expression -> paragraph 2 -> sentence 1
* - expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* - declarations, function-declaration -> paragraph 7 -> sentence 1
* - declarations, function-declaration -> paragraph 7 -> sentence 2
* - declarations, function-declaration -> paragraph 8 -> sentence 1
* - overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 1 -> sentence 3
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-152
* PRIMARY LINKS: expressions, when-expression -> paragraph 2 -> sentence 1
* expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
* declarations, function-declaration -> paragraph 7 -> sentence 1
* declarations, function-declaration -> paragraph 7 -> sentence 2
* declarations, function-declaration -> paragraph 8 -> sentence 1
* overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 1 -> sentence 3
*/
val <!OI;IMPLICIT_NOTHING_PROPERTY_TYPE!>test1<!> = when {