[Spec tests] Add tests for expressions and statements

This commit is contained in:
anastasiia.spaseeva
2020-01-10 17:00:43 +03:00
committed by Victor Petukhov
parent 5f4a94a1b3
commit 5986ffae1e
108 changed files with 4221 additions and 26 deletions
@@ -1,3 +1,7 @@
/*
* RELEVANT SPEC SENTENCES (spec version: 0.1-220, test type: pos):
* - 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,6 +1,9 @@
// !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
*/
import kotlin.reflect.KFunction0
fun test() {
@@ -1,6 +1,10 @@
// !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
*/
import kotlin.reflect.KProperty1
class DTO {
@@ -8,6 +8,7 @@
* RELEVANT PLACES: expressions, additive-expression -> paragraph 1 -> sentence 1
* expressions, additive-expression -> paragraph 1 -> sentence 2
* expressions, additive-expression -> paragraph 3 -> sentence 1
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A + B is exactly the same as A.plus(B)
*/
@@ -8,6 +8,7 @@
* RELEVANT PLACES: expressions, additive-expression -> paragraph 1 -> sentence 1
* expressions, additive-expression -> paragraph 1 -> sentence 2
* expressions, additive-expression -> paragraph 3 -> sentence 1
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A - B is exactly the same as A.MINUS(B)
*/
@@ -9,6 +9,7 @@
* expressions, comparison-expressions -> paragraph 2 -> sentence 1
* expressions, comparison-expressions -> paragraph 3 -> sentence 1
* expressions, comparison-expressions -> paragraph 4 -> sentence 1
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: These operators are overloadable (A < B)
*/
@@ -9,6 +9,7 @@
* expressions, comparison-expressions -> paragraph 2 -> sentence 2
* expressions, comparison-expressions -> paragraph 3 -> sentence 1
* expressions, comparison-expressions -> paragraph 4 -> sentence 1
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 2
* DESCRIPTION: These operators are overloadable (A > B)
*/
@@ -9,6 +9,7 @@
* expressions, comparison-expressions -> paragraph 2 -> sentence 3
* expressions, comparison-expressions -> paragraph 3 -> sentence 1
* expressions, comparison-expressions -> paragraph 4 -> sentence 1
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 3
* DESCRIPTION: These operators are overloadable (A <= B)
*/
@@ -9,6 +9,7 @@
* expressions, comparison-expressions -> paragraph 2 -> sentence 3
* expressions, comparison-expressions -> paragraph 3 -> sentence 1
* expressions, comparison-expressions -> paragraph 4 -> sentence 1
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 4
* DESCRIPTION: These operators are overloadable (A >= B)
*/
@@ -0,0 +1,27 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, break-expression -> paragraph 3 -> sentence 1
* RELEVANT PLACES: expressions, jump-expressions, break-expression -> paragraph 1 -> sentence 1
* expressions, jump-expressions, break-expression -> paragraph 1 -> sentence 2
* expressions, jump-expressions, break-expression -> paragraph 2 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A simple break expression, specified using the break keyword, which break-jumps to the innermost loop statement in the current scope
*/
fun box(): String {
val inputList = listOf(1, 2, 3)
var list1 = mutableListOf<Any>()
for (it in listOf(1, 2, 3)){
for (it1 in listOf("1.", "2.", "3.")) {
if (true) break
}
list1.add(it)
}
if (list1.containsAll(inputList))
return "OK"
else return "NOK"
}
@@ -0,0 +1,31 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, break-expression -> paragraph 3 -> sentence 1
* RELEVANT PLACES: expressions, jump-expressions, break-expression -> paragraph 1 -> sentence 1
* expressions, jump-expressions, break-expression -> paragraph 1 -> sentence 2
* expressions, jump-expressions, break-expression -> paragraph 2 -> sentence 1
* statements, loop-statements, while-loop-statement -> paragraph 1 -> sentence 2
* NUMBER: 2
* DESCRIPTION: A simple break expression, specified using the continue keyword, which break-jumps to the innermost loop statement in the current scope
*/
fun box(): String {
val inputList = listOf(0, 1, 2)
var x = 0
var y = 0
var list1 = mutableListOf<Any>()
while (x < 3) {
while (y< 3) {
y++
if (true) break
}
list1.add(x++)
}
if (list1.containsAll(inputList))
return "OK"
else return "NOK"
}
@@ -0,0 +1,27 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, break-expression -> paragraph 3 -> sentence 2
* RELEVANT PLACES: expressions, jump-expressions, break-expression -> paragraph 1 -> sentence 1
* expressions, jump-expressions, break-expression -> paragraph 1 -> sentence 2
* expressions, jump-expressions, break-expression -> paragraph 2 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A labeled break expression, denoted break@Loop, where Loop is a label of a labeled loop statement L, which continue-jumps to the loop L.
*/
fun box() : String{
val inputList = listOf(1, 2, 3)
var list1 = mutableListOf<Any>()
for (it in listOf(1, 2, 3)) {
label@ for (it1 in listOf("1.", "2.", "3.")) {
if (true) break@label
}
list1.add(it)
}
if (list1.containsAll(inputList))
return "OK"
else return "NOK"
}
@@ -0,0 +1,31 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, break-expression -> paragraph 3 -> sentence 2
* RELEVANT PLACES: expressions, jump-expressions, break-expression -> paragraph 1 -> sentence 1
* expressions, jump-expressions, break-expression -> paragraph 1 -> sentence 2
* expressions, jump-expressions, break-expression -> paragraph 2 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A labeled break expression, denoted break@Loop, where Loop is a label of a labeled loop statement L, which break-jumps to the loop L.
*/
fun box(): String {
val inputList = listOf(0, 1, 2)
var x = 0
var y = 0
var list1 = mutableListOf<Any>()
while (x < 3) {
label@ while (y< 3) {
y++
if (true) break@label
}
list1.add(x++)
}
if (list1.containsAll(inputList))
return "OK"
else return "NOK"
}
@@ -0,0 +1,68 @@
{
"3": {
"pos": {
"2": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A labeled break expression, denoted break@Loop, where Loop is a label of a labeled loop statement L, which continue-jumps to the loop L.",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A labeled break expression, denoted break@Loop, where Loop is a label of a labeled loop statement L, which break-jumps to the loop L.",
"unexpectedBehaviour": false
}
],
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A simple break expression, specified using the continue keyword, which break-jumps to the innermost loop statement in the current scope",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A simple break expression, specified using the break keyword, which break-jumps to the innermost loop statement in the current scope",
"unexpectedBehaviour": false
}
]
}
},
"1": {
"pos": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A labeled break expression, denoted break@Loop, where Loop is a label of a labeled loop statement L, which continue-jumps to the loop L.",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression/p-3/pos/2.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A simple break expression, specified using the continue keyword, which break-jumps to the innermost loop statement in the current scope",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression/p-3/pos/1.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A labeled break expression, denoted break@Loop, where Loop is a label of a labeled loop statement L, which break-jumps to the loop L.",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression/p-3/pos/2.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A simple break expression, specified using the break keyword, which break-jumps to the innermost loop statement in the current scope",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression/p-3/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,27 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, continue-expression -> paragraph 3 -> sentence 1
* RELEVANT PLACES: expressions, jump-expressions, continue-expression -> paragraph 1 -> sentence 1
* expressions, jump-expressions, continue-expression -> paragraph 1 -> sentence 2
* expressions, jump-expressions, continue-expression -> paragraph 2 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A simple continue expression, specified using the continue keyword, which continue-jumps to the innermost loop statement in the current scope
*/
fun box(): String {
val inputList = listOf(1, 2, 3)
var list1 = mutableListOf<Any>()
for (it in listOf(1, 2, 3)){
for (it1 in listOf("1.", "2.", "3.")) {
if (true) continue
}
list1.add(it)
}
if (list1.containsAll(inputList))
return "OK"
else return "NOK"
}
@@ -0,0 +1,30 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, continue-expression -> paragraph 3 -> sentence 1
* RELEVANT PLACES: expressions, jump-expressions, continue-expression -> paragraph 1 -> sentence 1
* expressions, jump-expressions, continue-expression -> paragraph 1 -> sentence 2
* expressions, jump-expressions, continue-expression -> paragraph 2 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A simple continue expression, specified using the continue keyword, which continue-jumps to the innermost loop statement in the current scope
*/
fun box(): String {
val inputList = listOf(0, 1, 2)
var x = 0
var y = 0
var list1 = mutableListOf<Any>()
while (x < 3) {
while (y< 3) {
y++
if (true) continue
}
list1.add(x++)
}
if (list1.containsAll(inputList))
return "OK"
else return "NOK"
}
@@ -0,0 +1,27 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, continue-expression -> paragraph 3 -> sentence 2
* RELEVANT PLACES: expressions, jump-expressions, continue-expression -> paragraph 1 -> sentence 1
* expressions, jump-expressions, continue-expression -> paragraph 1 -> sentence 2
* expressions, jump-expressions, continue-expression -> paragraph 2 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A labeled continue expression, denoted continue@Loop, where Loop is a label of a labeled loop statement L, which continue-jumps to the loop L.
*/
fun box() : String{
val inputList = listOf(1, 2, 3)
var list1 = mutableListOf<Any>()
for (it in listOf(1, 2, 3)) {
label@ for (it1 in listOf("1.", "2.", "3.")) {
if (true) continue@label
}
list1.add(it)
}
if (list1.containsAll(inputList))
return "OK"
else return "NOK"
}
@@ -0,0 +1,31 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, continue-expression -> paragraph 3 -> sentence 2
* RELEVANT PLACES: expressions, jump-expressions, continue-expression -> paragraph 1 -> sentence 1
* expressions, jump-expressions, continue-expression -> paragraph 1 -> sentence 2
* expressions, jump-expressions, continue-expression -> paragraph 2 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A labeled continue expression, denoted continue@Loop, where Loop is a label of a labeled loop statement L, which continue-jumps to the loop L.
*/
fun box(): String {
val inputList = listOf(0, 1, 2)
var x = 0
var y = 0
var list1 = mutableListOf<Any>()
while (x < 3) {
label@ while (y< 3) {
y++
if (true) continue@label
}
list1.add(x++)
}
if (list1.containsAll(inputList))
return "OK"
else return "NOK"
}
@@ -0,0 +1,68 @@
{
"3": {
"pos": {
"2": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A labeled continue expression, denoted continue@Loop, where Loop is a label of a labeled loop statement L, which continue-jumps to the loop L.",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A labeled continue expression, denoted continue@Loop, where Loop is a label of a labeled loop statement L, which continue-jumps to the loop L.",
"unexpectedBehaviour": false
}
],
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A simple continue expression, specified using the continue keyword, which continue-jumps to the innermost loop statement in the current scope",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A simple continue expression, specified using the continue keyword, which continue-jumps to the innermost loop statement in the current scope",
"unexpectedBehaviour": false
}
]
}
},
"1": {
"pos": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A labeled continue expression, denoted continue@Loop, where Loop is a label of a labeled loop statement L, which continue-jumps to the loop L.",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression/p-3/pos/2.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A simple continue expression, specified using the continue keyword, which continue-jumps to the innermost loop statement in the current scope",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression/p-3/pos/1.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A labeled continue expression, denoted continue@Loop, where Loop is a label of a labeled loop statement L, which continue-jumps to the loop L.",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression/p-3/pos/2.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A simple continue expression, specified using the continue keyword, which continue-jumps to the innermost loop statement in the current scope",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression/p-3/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,28 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, return-expressions -> paragraph 1 -> sentence 1
* RELEVANT PLACES: expressions, jump-expressions, return-expressions -> paragraph 5 -> sentence 1
* NUMBER: 1
* DESCRIPTION:
*/
fun box(): String {
try {
fooCase1()
}catch (e: NotImplementedError){
return "NOK"
}
return "OK"
}
class Case1
fun fooCase1(): Case1 {
val x = Case1()
return x
TODO()
}
@@ -0,0 +1,32 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, return-expressions -> paragraph 1 -> sentence 1
* RELEVANT PLACES: expressions, jump-expressions, return-expressions -> paragraph 5 -> sentence 1
* NUMBER: 2
* DESCRIPTION:
*/
val flag = false
fun box(): String {
try {
fooCase1()
} catch (e: NotImplementedError) {
return "NOK"
}
if (flag)
return "NOK"
return "OK"
}
class Case1
fun fooCase1(): Case1 {
val x = Case1()
return x
flag = true
TODO()
}
@@ -0,0 +1,26 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, return-expressions -> paragraph 1 -> sentence 1
* RELEVANT PLACES: expressions, jump-expressions, return-expressions -> paragraph 1 -> sentence 2
* expressions, jump-expressions, return-expressions -> paragraph 5 -> sentence 1
* NUMBER: 3
* DESCRIPTION:
*/
val flag = false
fun box() : String{
val x = foo()
if (x is kotlin.Unit && !flag)
return "OK"
return "NOK"
}
fun foo() {
return
1
flag = true
val x = ""
}
@@ -0,0 +1,27 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, return-expressions -> paragraph 3 -> sentence 2
* RELEVANT PLACES: expressions, jump-expressions, return-expressions -> paragraph 2 -> sentence 1
* expressions, jump-expressions, return-expressions -> paragraph 3 -> sentence 3
* expressions, jump-expressions, return-expressions -> paragraph 5 -> sentence 1
* NUMBER: 1
* DESCRIPTION: If several declarations match one name, the return is considered to be from the nearest matching function;
*/
fun box(): String {
val inputList = listOf(1, 2, 3)
var list1 = mutableListOf<Any>()
inputList.forEach mark@{
list1.add(it)
listOf("1.", "2.", "3.").forEach mark@{
if (true) return@mark
}
}
if (list1.containsAll(inputList))
return "OK"
else return "NOK"
}
@@ -0,0 +1,30 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-300
* PLACE: expressions, jump-expressions, return-expressions -> paragraph 3 -> sentence 3
* RELEVANT PLACES: expressions, jump-expressions, return-expressions -> paragraph 2 -> sentence 1
* expressions, jump-expressions, return-expressions -> paragraph 3 -> sentence 2
* expressions, jump-expressions, return-expressions -> paragraph 5 -> sentence 1
* NUMBER: 1
* DESCRIPTION: If return@Context is inside a lambda expression body, the name of the function using this lambda expression as its argument may be used as Context to refer to the lambda literal itself
*/
fun box(): String {
val inputList = listOf(1, 2, 3)
var list1 = mutableListOf<Any>()
inputList.forEach {
list1.add(it)
listOf("1.", "2.", "3.").forEach {
if (true) return@forEach
}
}
if (list1.containsAll(inputList))
return "OK"
else return "NOK"
}
@@ -0,0 +1,95 @@
{
"1": {
"pos": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "",
"unexpectedBehaviour": false
}
],
"2": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-1/pos/1.3.kt",
"unexpectedBehaviour": false
}
]
}
},
"5": {
"pos": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-1/pos/1.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-1/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
},
"3": {
"pos": {
"2": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "If several declarations match one name, the return is considered to be from the nearest matching function;",
"unexpectedBehaviour": false
}
],
"3": [
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "If return@Context is inside a lambda expression body, the name of the function using this lambda expression as its argument may be used as Context to refer to the lambda literal itself",
"unexpectedBehaviour": false
}
]
}
},
"2": {
"pos": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "If several declarations match one name, the return is considered to be from the nearest matching function;",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-3/pos/2.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "If return@Context is inside a lambda expression body, the name of the function using this lambda expression as its argument may be used as Context to refer to the lambda literal itself",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-3/pos/3.1.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -7,6 +7,7 @@
* PLACE: expressions, multiplicative-expression -> paragraph 2 -> sentence 1
* RELEVANT PLACES: expressions, multiplicative-expression -> paragraph 1 -> sentence 1
* expressions, multiplicative-expression -> paragraph 1 -> sentence 2
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A * B is exactly the same as A.times(B)
*/
@@ -7,6 +7,7 @@
* PLACE: expressions, multiplicative-expression -> paragraph 2 -> sentence 2
* RELEVANT PLACES: expressions, multiplicative-expression -> paragraph 1 -> sentence 1
* expressions, multiplicative-expression -> paragraph 1 -> sentence 2
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A / B is exactly the same as A.div(B)
*/
@@ -7,6 +7,7 @@
* PLACE: expressions, multiplicative-expression -> paragraph 2 -> sentence 3
* RELEVANT PLACES: expressions, multiplicative-expression -> paragraph 1 -> sentence 1
* expressions, multiplicative-expression -> paragraph 1 -> sentence 2
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A % B is exactly the same as A.rem(B)
*/
@@ -0,0 +1,3 @@
java.lang.IllegalStateException: ASSIGN_OPERATOR_AMBIGUITY: Assignment operators ambiguity:
public final operator fun plus(value: Int): B defined in B
public final operator fun plusAssign(value: Int): Unit defined in B (31,7) in /1.1.kt
@@ -0,0 +1,32 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* NUMBER: 1
* DESCRIPTION: A += B is exactly the same as A.plusAssign(B) or A = A.plus(B) (applied in order)
* EXCEPTION: compiletime
*/
class B(var a: Int) {
var plus = false
var plusAssign = false
operator fun plus(value: Int): B {
plus = true
return B(a + value)
}
operator fun plusAssign(value: Int) {
plusAssign = true
a = a + value
}
}
fun box() {
var b = B(1)
b += 1 //error
}
@@ -0,0 +1 @@
java.lang.IllegalStateException: VAL_REASSIGNMENT: Val cannot be reassigned (30,5) in /1.2.kt
@@ -0,0 +1,31 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A += B is exactly the same as A.plusAssign(B) or A = A.plus(B) (applied in order)
* EXCEPTION: compiletime
*/
class B(var a: Int) {
var plus = false
var plusAssign = false
operator fun plus(value: Int): B {
plus = true
return B(a + value)
}
}
fun box() {
val b = B(1)
b += 1 //error
}
@@ -0,0 +1,3 @@
java.lang.IllegalStateException: ASSIGN_OPERATOR_AMBIGUITY: Assignment operators ambiguity:
public final operator fun div(value: Int): B defined in B
public final operator fun divAssign(value: Int): Unit defined in B (31,7) in /10.1.kt
@@ -0,0 +1,32 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 10
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 11
* NUMBER: 1
* DESCRIPTION: A /= B is exactly the same as A.divAssign(B) or A = A.div(B) (applied in order)
* EXCEPTION: compiletime
*/
class B(var a: Int) {
var div = false
var divAssign = false
operator fun div(value: Int): B {
div = true
return B(a / value)
}
operator fun divAssign(value: Int) {
divAssign = true
a = a / value
}
}
fun box() {
var b = B(1)
b /= 1 //error
}
@@ -0,0 +1 @@
java.lang.IllegalStateException: VAL_REASSIGNMENT: Val cannot be reassigned (30,5) in /10.2.kt
@@ -0,0 +1,31 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 10
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 11
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 12
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A /= B is exactly the same as A.divAssign(B) or A = A.div(B) (applied in order)
* EXCEPTION: compiletime
*/
class B(var a: Int) {
var div = false
var divAssign = false
operator fun div(value: Int): B {
div = true
return B(a / value)
}
}
fun box() {
val b = B(1)
b /= 1 //error
}
@@ -0,0 +1,3 @@
java.lang.IllegalStateException: ASSIGN_OPERATOR_AMBIGUITY: Assignment operators ambiguity:
public final operator fun rem(value: Int): B defined in B
public final operator fun remAssign(value: Int): Unit defined in B (31,7) in /13.1.kt
@@ -0,0 +1,32 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 13
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 14
* NUMBER: 1
* DESCRIPTION: A %= B is exactly the same as A.remAssign(B) or A = A.rem(B) (applied in order)
* EXCEPTION: compiletime
*/
class B(var a: Int) {
var rem = false
var remAssign = false
operator fun rem(value: Int): B {
rem = true
return B(a % value)
}
operator fun remAssign(value: Int) {
remAssign = true
a = a % value
}
}
fun box() {
var b = B(1)
b %= 1 //error
}
@@ -0,0 +1 @@
java.lang.IllegalStateException: VAL_REASSIGNMENT: Val cannot be reassigned (30,5) in /13.2.kt
@@ -0,0 +1,31 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 13
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 14
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 15
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A %= B is exactly the same as A.remAssign(B) or A = A.rem(B) (applied in order)
* EXCEPTION: compiletime
*/
class B(var a: Int) {
var rem = false
var remAssign = false
operator fun rem(value: Int): B {
rem = true
return B(a % value)
}
}
fun box() {
val b = B(1)
b %= 1 //error
}
@@ -0,0 +1,3 @@
java.lang.IllegalStateException: ASSIGN_OPERATOR_AMBIGUITY: Assignment operators ambiguity:
public final operator fun minus(value: Int): B defined in B
public final operator fun minusAssign(value: Int): Unit defined in B (31,7) in /4.1.kt
@@ -0,0 +1,32 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-253
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 4
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 5
* NUMBER: 1
* DESCRIPTION: A -= B is exactly the same as A.minusAssign(B) or A = A.minus(B) (applied in order)
* EXCEPTION: compiletime
*/
class B(var a: Int) {
var minus = false
var minusAssign = false
operator fun minus(value: Int): B {
minus = true
return B(a - value)
}
operator fun minusAssign(value: Int) {
minusAssign = true
a = a - value
}
}
fun box() {
var b = B(1)
b -= 1 //error
}
@@ -0,0 +1 @@
java.lang.IllegalStateException: VAL_REASSIGNMENT: Val cannot be reassigned (30,5) in /4.2.kt
@@ -0,0 +1,31 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-253
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 4
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 5
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 6
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A -= B is exactly the same as A.minusAssign(B) or A = A.minus(B) (applied in order)
* EXCEPTION: compiletime
*/
class B(var a: Int) {
var minus = false
var minusAssign = false
operator fun minus(value: Int): B {
minus = true
return B(a + value)
}
}
fun box(){
val b = B(1)
b -= 1 //error
}
@@ -0,0 +1,3 @@
java.lang.IllegalStateException: ASSIGN_OPERATOR_AMBIGUITY: Assignment operators ambiguity:
public final operator fun times(value: Int): B defined in B
public final operator fun timesAssign(value: Int): Unit defined in B (31,7) in /7.1.kt
@@ -0,0 +1,32 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 7
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 8
* NUMBER: 1
* DESCRIPTION: A *= B is exactly the same as A.timesAssign(B) or A = A.times(B) (applied in order)
* EXCEPTION: compiletime
*/
class B(var a: Int) {
var times = false
var timesAssign = false
operator fun times(value: Int): B {
times = true
return B(a * value)
}
operator fun timesAssign(value: Int) {
timesAssign = true
a = a * value
}
}
fun box() {
var b = B(1)
b *= 1 //error
}
@@ -0,0 +1 @@
java.lang.IllegalStateException: VAL_REASSIGNMENT: Val cannot be reassigned (30,5) in /7.2.kt
@@ -0,0 +1,31 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 7
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 8
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 9
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A *= B is exactly the same as A.timesAssign(B) or A = A.times(B) (applied in order)
* EXCEPTION: compiletime
*/
class B(var a: Int) {
var times = false
var timesAssign = false
operator fun times(value: Int): B {
times = true
return B(a * value)
}
}
fun box() {
val b = B(1)
b *= 1 //error
}
@@ -0,0 +1,35 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* NUMBER: 1
* DESCRIPTION: A += B is exactly the same as A.plusAssign(B) or A = A.plus(B) (applied in order)
*/
class B(var a: Int) {
var plus = false
var plusAssign = false
operator fun plus(value: Int): B {
plus = true
return B(a + value)
}
operator fun plusAssign(value: Int) {
plusAssign = true
a = a + value
}
}
fun box(): String {
val b = B(1)
b += 1
if (!b.plus && b.plusAssign && b.a == 2)
return "OK"
return "NOK"
}
@@ -0,0 +1,34 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A += B is exactly the same as A.plusAssign(B) or A = A.plus(B) (applied in order)
*/
class B(var a: Int) {
var plus = false
operator fun plus(value: Int): B {
plus = true
a= a + value
return this
}
}
fun box(): String {
var b = B(1)
b += 1
if (b.plus && b.a == 2)
return "OK"
return "NOK"
}
@@ -0,0 +1,35 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 10
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 11
* NUMBER: 1
* DESCRIPTION: A /= B is exactly the same as A.divAssign(B) or A = A.div(B) (applied in order)
*/
class B(var a: Int) {
var div = false
var divAssign = false
operator fun div(value: Int): B {
div = true
return B(a / value)
}
operator fun divAssign(value: Int) {
divAssign = true
a = a / value
}
}
fun box(): String {
val b = B(1)
b /= 1
if (!b.div && b.divAssign)
return "OK"
return "NOK"
}
@@ -0,0 +1,34 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 10
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 11
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 12
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A /= B is exactly the same as A.divAssign(B) or A = A.div(B) (applied in order)
*/
class B(var a: Int) {
var div = false
operator fun div(value: Int): B {
div = true
a= a / value
return this
}
}
fun box(): String {
var b = B(1)
b /= 1
if (b.div)
return "OK"
return "NOK"
}
@@ -0,0 +1,35 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 13
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 14
* NUMBER: 1
* DESCRIPTION: A %= B is exactly the same as A.remAssign(B) or A = A.rem(B) (applied in order)
*/
class B(var a: Int) {
var rem = false
var remAssign = false
operator fun rem(value: Int): B {
rem = true
return B(a % value)
}
operator fun remAssign(value: Int) {
remAssign = true
a = a % value
}
}
fun box(): String {
val b = B(1)
b %= 1
if (!b.rem && b.remAssign)
return "OK"
return "NOK"
}
@@ -0,0 +1,34 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 13
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 14
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 15
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A %= B is exactly the same as A.remAssign(B) or A = A.rem(B) (applied in order)
*/
class B(var a: Int) {
var rem = false
operator fun rem(value: Int): B {
rem = true
a= a % value
return this
}
}
fun box(): String {
var b = B(1)
b %= 1
if (b.rem)
return "OK"
return "NOK"
}
@@ -0,0 +1,35 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-253
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 4
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 5
* NUMBER: 1
* DESCRIPTION: A -= B is exactly the same as A.minusAssign(B) or A = A.minus(B) (applied in order)
*/
class B(var a: Int) {
var minus = false
var minusAssign = false
operator fun minus(value: Int): B {
minus = true
return B(a - value)
}
operator fun minusAssign(value: Int) {
minusAssign = true
a = a - value
}
}
fun box(): String {
val b = B(1)
b -= 1
if (!b.minus && b.minusAssign && b.a == 0)
return "OK"
return "NOK"
}
@@ -0,0 +1,33 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-253
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 4
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 5
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A -= B is exactly the same as A.plusAssign(B) or A = A.minus(B) (applied in order)
*/
class B(var a: Int) {
var minus = false
operator fun minus(value: Int): B {
minus = true
a= a - value
return this
}
}
fun box(): String {
var b = B(1)
b -= 1
if (b.minus && b.a == 0)
return "OK"
return "NOK"
}
@@ -0,0 +1,36 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 7
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 8
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 9
* NUMBER: 1
* DESCRIPTION: A *= B is exactly the same as A.timesAssign(B) or A = A.times(B) (applied in order)
*/
class B(var a: Int) {
var times = false
var timesAssign = false
operator fun times(value: Int): B {
times = true
return B(a * value)
}
operator fun timesAssign(value: Int) {
timesAssign = true
a = a * value
}
}
fun box(): String {
val b = B(4)
b *= 3
if (!b.times && b.timesAssign && b.a == 12)
return "OK"
return "NOK"
}
@@ -0,0 +1,34 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 7
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 8
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 9
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A *= B is exactly the same as A.timesAssign(B) or A = A.times(B) (applied in order)
*/
class B(var a: Int) {
var times = false
operator fun times(value: Int): B {
times = true
a= a * value
return this
}
}
fun box(): String {
var b = B(2)
b *= 3
if (b.times && b.a == 6)
return "OK"
return "NOK"
}
@@ -0,0 +1,308 @@
{
"2": {
"neg": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A +\u003d B is exactly the same as A.plusAssign(B) or A \u003d A.plus(B) (applied in order)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A +\u003d B is exactly the same as A.plusAssign(B) or A \u003d A.plus(B) (applied in order)",
"unexpectedBehaviour": false
}
],
"2": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A +\u003d B is exactly the same as A.plusAssign(B) or A \u003d A.plus(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/1.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A +\u003d B is exactly the same as A.plusAssign(B) or A \u003d A.plus(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/1.1.kt",
"unexpectedBehaviour": false
}
],
"10": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A /\u003d B is exactly the same as A.divAssign(B) or A \u003d A.div(B) (applied in order)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A /\u003d B is exactly the same as A.divAssign(B) or A \u003d A.div(B) (applied in order)",
"unexpectedBehaviour": false
}
],
"11": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A /\u003d B is exactly the same as A.divAssign(B) or A \u003d A.div(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/10.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A /\u003d B is exactly the same as A.divAssign(B) or A \u003d A.div(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/10.1.kt",
"unexpectedBehaviour": false
}
],
"13": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A %\u003d B is exactly the same as A.remAssign(B) or A \u003d A.rem(B) (applied in order)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A %\u003d B is exactly the same as A.remAssign(B) or A \u003d A.rem(B) (applied in order)",
"unexpectedBehaviour": false
}
],
"14": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A %\u003d B is exactly the same as A.remAssign(B) or A \u003d A.rem(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/13.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A %\u003d B is exactly the same as A.remAssign(B) or A \u003d A.rem(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/13.2.kt",
"unexpectedBehaviour": false
}
],
"7": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A *\u003d B is exactly the same as A.timesAssign(B) or A \u003d A.times(B) (applied in order)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A *\u003d B is exactly the same as A.timesAssign(B) or A \u003d A.times(B) (applied in order)",
"unexpectedBehaviour": false
}
],
"8": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A *\u003d B is exactly the same as A.timesAssign(B) or A \u003d A.times(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/7.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A *\u003d B is exactly the same as A.timesAssign(B) or A \u003d A.times(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/7.1.kt",
"unexpectedBehaviour": false
}
],
"4": [
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "A -\u003d B is exactly the same as A.minusAssign(B) or A \u003d A.minus(B) (applied in order)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "A -\u003d B is exactly the same as A.minusAssign(B) or A \u003d A.minus(B) (applied in order)",
"unexpectedBehaviour": false
}
],
"5": [
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "A -\u003d B is exactly the same as A.minusAssign(B) or A \u003d A.minus(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/4.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "A -\u003d B is exactly the same as A.minusAssign(B) or A \u003d A.minus(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/4.2.kt",
"unexpectedBehaviour": false
}
]
},
"pos": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A +\u003d B is exactly the same as A.plusAssign(B) or A \u003d A.plus(B) (applied in order)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A +\u003d B is exactly the same as A.plusAssign(B) or A \u003d A.plus(B) (applied in order)",
"unexpectedBehaviour": false
}
],
"2": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A +\u003d B is exactly the same as A.plusAssign(B) or A \u003d A.plus(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/1.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A +\u003d B is exactly the same as A.plusAssign(B) or A \u003d A.plus(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/1.1.kt",
"unexpectedBehaviour": false
}
],
"10": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A /\u003d B is exactly the same as A.divAssign(B) or A \u003d A.div(B) (applied in order)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A /\u003d B is exactly the same as A.divAssign(B) or A \u003d A.div(B) (applied in order)",
"unexpectedBehaviour": false
}
],
"11": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A /\u003d B is exactly the same as A.divAssign(B) or A \u003d A.div(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/10.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A /\u003d B is exactly the same as A.divAssign(B) or A \u003d A.div(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/10.1.kt",
"unexpectedBehaviour": false
}
],
"13": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A %\u003d B is exactly the same as A.remAssign(B) or A \u003d A.rem(B) (applied in order)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A %\u003d B is exactly the same as A.remAssign(B) or A \u003d A.rem(B) (applied in order)",
"unexpectedBehaviour": false
}
],
"14": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A %\u003d B is exactly the same as A.remAssign(B) or A \u003d A.rem(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/13.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A %\u003d B is exactly the same as A.remAssign(B) or A \u003d A.rem(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/13.2.kt",
"unexpectedBehaviour": false
}
],
"7": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A *\u003d B is exactly the same as A.timesAssign(B) or A \u003d A.times(B) (applied in order)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A *\u003d B is exactly the same as A.timesAssign(B) or A \u003d A.times(B) (applied in order)",
"unexpectedBehaviour": false
}
],
"8": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A *\u003d B is exactly the same as A.timesAssign(B) or A \u003d A.times(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/7.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "A *\u003d B is exactly the same as A.timesAssign(B) or A \u003d A.times(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/7.1.kt",
"unexpectedBehaviour": false
}
],
"4": [
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "A -\u003d B is exactly the same as A.minusAssign(B) or A \u003d A.minus(B) (applied in order)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "A -\u003d B is exactly the same as A.plusAssign(B) or A \u003d A.minus(B) (applied in order)",
"unexpectedBehaviour": false
}
],
"5": [
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "A -\u003d B is exactly the same as A.minusAssign(B) or A \u003d A.minus(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/4.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "A -\u003d B is exactly the same as A.plusAssign(B) or A \u003d A.minus(B) (applied in order)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/4.2.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,33 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 1
* NUMBER: 1
* DESCRIPTION: If a property has a setter, it is called using the right-hand side expression as its argument;
*/
var flag1 = false
var flag2 = false
val valToSet = 5
class C() {
var counter = 0
set(value) {
flag1 = true
if (value == valToSet)
flag2 = true
field = value
}
}
fun box(): String {
val c = C()
assert(!flag1)
assert(!flag2)
c.counter = valToSet
if (flag1 && flag2 && c.counter == valToSet) return "OK"
return "NOK"
}
@@ -0,0 +1,33 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 1
* NUMBER: 2
* DESCRIPTION: If a property has a setter, it is called using the right-hand side expression as its argument;
*/
var flag1 = false
var flag2 = false
val valToSet = 5
var counter = 0
set(value) {
flag1 = true
if (value == valToSet)
flag2 = true
field = value
}
fun box(): String {
assert(!flag1)
assert(!flag2)
counter = valToSet
if (flag1 && flag2 && counter == valToSet) return "OK"
return "NOK"
}
@@ -0,0 +1,40 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 1
* NUMBER: 3
* DESCRIPTION: If a property has a setter (including delegated properties), it is called using the right-hand side expression as its argument
*/
import kotlin.reflect.KProperty
var flag = false
var data = "FooBoo"
fun box(): String {
val e = Example()
assert(!flag)
e.p = data
if (flag && e.p == data) return "OK"
return "NOK"
}
class Example {
var p: String by Delegate()
}
class Delegate {
var d: String? = null
operator fun getValue(example: Example, property: KProperty<*>): String {
return d.toString()
}
operator fun setValue(example: Example, property: KProperty<*>, s: String) {
flag = true
d = s
}
}
@@ -0,0 +1,35 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-300
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, simple-assignments -> paragraph 2 -> sentence 2
* NUMBER: 4
* DESCRIPTION: check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)
*/
var flag1 = false
var flag2 = false
val valToSet = 5
class C() {
var counter = 0
set(value) {
flag1 = true
if (value == valToSet)
flag2 = true
field = value
}
}
fun box(): String {
val c : C? = C()
assert(!flag1)
assert(!flag2)
c?.counter = valToSet
if ( flag1 && flag2 && c?.counter == valToSet) return "OK"
return "NOK"
}
@@ -0,0 +1,24 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-300
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, simple-assignments -> paragraph 2 -> sentence 2
* NUMBER: 5
* DESCRIPTION: check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)
*/
val valToSet = 5
class C() {
var counter = 0
}
fun box(): String {
val c :C?= C()
c?.counter = valToSet
if (c?.counter == valToSet) return "OK"
return "NOK"
}
@@ -0,0 +1,36 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-300
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, simple-assignments -> paragraph 2 -> sentence 2
* NUMBER: 6
* DESCRIPTION: check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)
*/
var flag1 = false
var flag2 = false
val valToSet = 5
class C() {
var counter = 0
set(value) {
flag1 = true
if (value == valToSet)
flag2 = true
field = value
}
}
fun box(): String {
val c : C? = null
assert(!flag1)
assert(!flag2)
c?.counter = valToSet
if ( !flag1 && !flag2 && c?.counter != valToSet) return "OK"
return "NOK"
}
@@ -0,0 +1,42 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-300
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, simple-assignments -> paragraph 2 -> sentence 2
* NUMBER: 7
* DESCRIPTION: check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)
*/
import kotlin.reflect.KProperty
var flag = false
var data = "FooBoo"
fun box(): String {
val e: Example? = Example()
assert(!flag)
e?.p = data
if (flag && e?.p == data) return "OK"
return "NOK"
}
class Example {
var p: String by Delegate()
}
class Delegate {
var d: String? = null
operator fun getValue(example: Example, property: KProperty<*>): String {
return d.toString()
}
operator fun setValue(example: Example, property: KProperty<*>, s: String) {
flag = true
d = s
}
}
@@ -0,0 +1,42 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-300
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, simple-assignments -> paragraph 2 -> sentence 2
* NUMBER: 8
* DESCRIPTION: check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)
*/
import kotlin.reflect.KProperty
var flag = false
var data = "FooBoo"
fun box(): String {
val e: Example? = null
assert(!flag)
e?.p = data
if (!flag && e?.p != data) return "OK"
return "NOK"
}
class Example {
var p: String by Delegate()
}
class Delegate {
var d: String? = null
operator fun getValue(example: Example, property: KProperty<*>): String {
return d.toString()
}
operator fun setValue(example: Example, property: KProperty<*>, s: String) {
flag = true
d = s
}
}
@@ -0,0 +1,24 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 2
* NUMBER: 1
* DESCRIPTION: If a property has a setter, it is called using the right-hand side expression as its argument;
*/
val valToSet = 5
class C() {
var counter = 0
}
fun box(): String {
val c = C()
c.counter = valToSet
if (c.counter == valToSet) return "OK"
return "NOK"
}
@@ -0,0 +1,20 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 2
* NUMBER: 2
* DESCRIPTION: If a property has a setter, it is called using the right-hand side expression as its argument;
*/
val valToSet = 5
var counter = 0
fun box(): String {
counter = valToSet
if (counter == valToSet) return "OK"
return "NOK"
}
@@ -0,0 +1,37 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, simple-assignments -> paragraph 2 -> sentence 2
* NUMBER: 3
* DESCRIPTION: If a property has a setter (including delegated properties), it is called using the right-hand side expression as its argument
*/
import kotlin.reflect.KProperty
var data = "FooBoo"
fun box(): String {
val e = Example()
e.p = data
if ( e.p == data) return "OK"
return "NOK"
}
class Example {
var p: String by Delegate()
}
class Delegate {
var d: String? = null
operator fun getValue(example: Example, property: KProperty<*>): String {
return d.toString()
}
operator fun setValue(example: Example, property: KProperty<*>, s: String) {
d = s
}
}
@@ -0,0 +1,38 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments, simple-assignments -> paragraph 6 -> sentence 1
* RELEVANT PLACES: statements, assignments, simple-assignments -> paragraph 7 -> sentence 1
* NUMBER: 1
* DESCRIPTION:
*/
class A() {
val list = arrayListOf(1, 2, 3)
operator fun set(a: Int, value: Int) {
this.list.add(a, value)
}
operator fun set(a: Int, b: Int, value: Int) {
this.list.add(a, value)
this.list.add(b, value)
}
}
fun box(): String {
val a = A()
a[0] = 0
val b = A()
b[0, 2] = 0
if (a.list == arrayListOf(0, 1, 2, 3) &&
b.list == arrayListOf(0, 1, 0, 2, 3)
)
return "OK"
return "NOK"
}
@@ -0,0 +1,136 @@
{
"6": {
"pos": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "",
"unexpectedBehaviour": false
}
]
}
},
"7": {
"pos": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-6/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
},
"2": {
"pos": {
"1": [
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "If a property has a setter, it is called using the right-hand side expression as its argument;",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "If a property has a setter (including delegated properties), it is called using the right-hand side expression as its argument",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "If a property has a setter, it is called using the right-hand side expression as its argument;",
"unexpectedBehaviour": false
}
],
"2": [
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2/pos/1.6.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "If a property has a setter, it is called using the right-hand side expression as its argument;",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2/pos/1.7.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2/pos/1.8.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2/pos/1.4.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "If a property has a setter (including delegated properties), it is called using the right-hand side expression as its argument",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-300",
"casesNumber": 0,
"description": "check if a property has a setter, it is called using the right-hand side expression as its argument;If the left-hand side of an assignment refers to a mutable property through the usage of safe navigation operator (?.)",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2/pos/1.5.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 0,
"description": "If a property has a setter, it is called using the right-hand side expression as its argument;",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,23 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-253
* PLACE: statements, loop-statements, do-while-loop-statement -> paragraph 1 -> sentence 3
* RELEVANT PLACES: statements, loop-statements, do-while-loop-statement -> paragraph 2 -> sentence 1
* statements, loop-statements, do-while-loop-statement -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: do-while-loop-statement evaluates the loop condition expression after evaluating the loop body.
*/
fun box(): String {
var x = 1;
do {
x++
} while (false)
if (x == 2)
return "OK"
return "NOK"
}
@@ -0,0 +1,23 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-253
* PLACE: statements, loop-statements, do-while-loop-statement -> paragraph 1 -> sentence 3
* RELEVANT PLACES: statements, loop-statements, do-while-loop-statement -> paragraph 2 -> sentence 1
* statements, loop-statements, do-while-loop-statement -> paragraph 1 -> sentence 2
* NUMBER: 2
* DESCRIPTION: do-while-loop-statement evaluates the loop condition expression after evaluating the loop body.
*/
fun box(): String {
var x = 1;
do {
x++
} while (x < 2)
if (x == 2)
return "OK"
return "NOK"
}
@@ -0,0 +1,40 @@
{
"1": {
"pos": {
"3": [
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "do-while-loop-statement evaluates the loop condition expression after evaluating the loop body.",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "do-while-loop-statement evaluates the loop condition expression after evaluating the loop body.",
"unexpectedBehaviour": false
}
]
}
},
"2": {
"pos": {
"1": [
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "do-while-loop-statement evaluates the loop condition expression after evaluating the loop body.",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement/p-1/pos/3.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "do-while-loop-statement evaluates the loop condition expression after evaluating the loop body.",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement/p-1/pos/3.2.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,23 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-253
* PLACE: statements, loop-statements, while-loop-statement -> paragraph 1 -> sentence 2
* RELEVANT PLACES: statements, loop-statements, while-loop-statement -> paragraph 2 -> sentence 1
* NUMBER: 1
* DESCRIPTION: while-loop-statement evaluates the loop condition expression before evaluating the loop body.
*/
fun box(): String {
var x = 1;
var cond = true
while (cond) {
x++
if (x == 5) cond = false
}
if (x == 5)
return "OK"
return "NOK"
}
@@ -0,0 +1,23 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-253
* PLACE: statements, loop-statements, while-loop-statement -> paragraph 1 -> sentence 2
* RELEVANT PLACES: statements, loop-statements, while-loop-statement -> paragraph 2 -> sentence 1
* NUMBER: 2
* DESCRIPTION: while-loop-statement evaluates the loop condition expression before evaluating the loop body.
*/
fun box(): String {
var x = 1;
var cond = true
while (cond) {
x++
cond = false
}
if (x == 2)
return "OK"
return "NOK"
}
@@ -0,0 +1,40 @@
{
"1": {
"pos": {
"2": [
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "while-loop-statement evaluates the loop condition expression before evaluating the loop body.",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "while-loop-statement evaluates the loop condition expression before evaluating the loop body.",
"unexpectedBehaviour": false
}
]
}
},
"2": {
"pos": {
"1": [
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "while-loop-statement evaluates the loop condition expression before evaluating the loop body.",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/while-loop-statement/p-1/pos/2.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-253",
"casesNumber": 0,
"description": "while-loop-statement evaluates the loop condition expression before evaluating the loop body.",
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/while-loop-statement/p-1/pos/2.2.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -8,6 +8,7 @@
* SPEC VERSION: 0.1-218
* PLACE: expressions, additive-expression -> paragraph 4 -> sentence 1
* RELEVANT PLACES: expressions, additive-expression -> paragraph 4 -> sentence 2
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: The return type of these functions is not restricted.
* HELPERS: checkType
@@ -1,24 +1,4 @@
{
"3": {
"pos": {
"1": [
{
"specVersion": "0.1-220",
"casesNumber": 0,
"description": "Class vs package",
"path": "compiler/testData/diagnostics/tests/callableReference/classVsPackage.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-220",
"casesNumber": 0,
"description": "Bare type",
"path": "compiler/testData/diagnostics/tests/callableReference/bareType.kt",
"unexpectedBehaviour": false
}
]
}
},
"11": {
"pos": {
"3": [
@@ -31,5 +11,18 @@
}
]
}
},
"3": {
"pos": {
"1": [
{
"specVersion": "0.1-220",
"casesNumber": 0,
"description": "Bare type",
"path": "compiler/testData/diagnostics/tests/callableReference/bareType.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,28 @@
{
"9": {
"pos": {
"2": [
{
"specVersion": "0.1-220",
"casesNumber": 0,
"description": "Correct info after array like call",
"path": "compiler/testData/diagnostics/tests/callableReference/correctInfoAfterArrayLikeCall.kt",
"unexpectedBehaviour": false
}
]
}
},
"8": {
"pos": {
"1": [
{
"specVersion": "0.1-220",
"casesNumber": 0,
"description": "Correct info after array like call",
"path": "compiler/testData/diagnostics/tests/callableReference/correctInfoAfterArrayLikeCall.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -7,6 +7,7 @@
*
* SPEC VERSION: 0.1-220
* PLACE: expressions, comparison-expressions -> paragraph 1 -> sentence 2
* RELEVANT PLACES: overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: <, >, <= and >= operators are overloadable
*/
@@ -7,6 +7,7 @@
*
* SPEC VERSION: 0.1-218
* PLACE: expressions, comparison-expressions -> paragraph 4 -> sentence 1
* RELEVANT PLACES: overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: The compareTo operator function must have return type kotlin.Int
*/
@@ -7,6 +7,7 @@
*
* SPEC VERSION: 0.1-218
* PLACE: expressions, comparison-expressions -> paragraph 5 -> sentence 1
* RELEVANT PLACES: overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: All comparison expressions always have type kotlin.Boolean.
* HELPERS: checkType
@@ -0,0 +1,38 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, break-expression -> paragraph 1 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A break expression is a jump expression allowed only within loop bodies.
*/
// TESTCASE NUMBER: 1
fun case1() {
val inputList = listOf(1, 2, 3)
inputList.forEach {
listOf("1.", "2.", "3.").forEach {
if (true) <!NOT_A_LOOP_LABEL!>break<!LABEL_NAME_CLASH!>@forEach<!><!>
}
}
}
// TESTCASE NUMBER: 2
fun case2() {
val inputList = listOf(1, 2, 3)
inputList.forEach {
listOf("1.", "2.", "3.").forEach {
if (true) <!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>break<!>
}
}
}
// TESTCASE NUMBER: 3
fun case3() {
<!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>break<!>
}
@@ -0,0 +1,14 @@
{
"1": {
"neg": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 3,
"description": "A break expression is a jump expression allowed only within loop bodies.",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,38 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, continue-expression -> paragraph 1 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A continue expression is a jump expression allowed only within loop bodies.
*/
// TESTCASE NUMBER: 1
fun case1() {
val inputList = listOf(1, 2, 3)
inputList.forEach {
listOf("1.", "2.", "3.").forEach {
if (true) <!NOT_A_LOOP_LABEL!>continue<!LABEL_NAME_CLASH!>@forEach<!><!>
}
}
}
// TESTCASE NUMBER: 2
fun case2() {
val inputList = listOf(1, 2, 3)
inputList.forEach {
listOf("1.", "2.", "3.").forEach {
if (true) <!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>continue<!>
}
}
}
// TESTCASE NUMBER: 3
fun case3() {
<!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>continue<!>
}
@@ -0,0 +1,14 @@
{
"1": {
"neg": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 3,
"description": "A continue expression is a jump expression allowed only within loop bodies.",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,63 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: expressions, jump-expressions, return-expressions -> paragraph 1 -> sentence 1
* NUMBER: 1
* DESCRIPTION:
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
fun case1() {
val x = fooCase1()
x checkType { check<Case1>() }
}
class Case1
fun fooCase1(): Case1 = TODO()
// TESTCASE NUMBER: 2
fun case2() {
val x = fooCase2()
x checkType { check<Case1>() }
}
fun fooCase2(): Case1 {
val x = ""
return Case1()
<!UNREACHABLE_CODE!>val y = ""<!>
}
// TESTCASE NUMBER: 3
fun case3() {
val x = object : Case13 {
override fun fooCase3(): Int {
return 1
<!UNREACHABLE_CODE!>"str"<!>
<!UNREACHABLE_CODE!>3<!>
}
}.fooCase3()
x checkType { check<Int>() }
}
interface Case13 {
fun fooCase3(): Int
}
// TESTCASE NUMBER: 4
fun case4() {
val x = fooCase4()
x checkType { check<kotlin.Unit>() }
}
fun fooCase4() {
return
}
@@ -1,4 +1,16 @@
{
"1": {
"pos": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 4,
"description": "",
"unexpectedBehaviour": false
}
]
}
},
"5": {
"neg": {
"2": [
@@ -10,6 +10,7 @@
* DESCRIPTION: Non-exhaustive when using nullable boolean values.
*/
// TESTCASE NUMBER: 1
fun case_1(value_1: Boolean?): String = <!NO_ELSE_IN_WHEN!>when<!>(value_1) {
true -> ""
@@ -0,0 +1,33 @@
{
"4": {
"neg": {
"1": [
{
"specVersion": "0.1-220",
"casesNumber": 1,
"description": "\u003c, \u003e, \u003c\u003d and \u003e\u003d operators are overloadable",
"path": "compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-1/neg/2.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-218",
"casesNumber": 4,
"description": "The compareTo operator function must have return type kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-4/neg/1.1.kt",
"unexpectedBehaviour": false
}
]
},
"pos": {
"1": [
{
"specVersion": "0.1-218",
"casesNumber": 4,
"description": "All comparison expressions always have type kotlin.Boolean.",
"path": "compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-5/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,32 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-253
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: An operator assignment A+=B
*/
class B(var a: Int) {
operator fun plus(value: Int): B {
a= a + value
return this
}
operator fun plusAssign(value: Int): Unit {
a= a + value
}
}
// TESTCASE NUMBER: 1
fun case1() {
var b = B(1)
b <!ASSIGN_OPERATOR_AMBIGUITY!>+=<!> 1
}
@@ -0,0 +1,32 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-253
* PLACE: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* statements, assignments, operator-assignments -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: An operator assignment A+=B
*/
class B(var a: Int) {
operator fun plus(value: Int): B {
a= a + value
return this
}
operator fun plusAssign(value: Int): Unit {
a= a + value
}
}
// TESTCASE NUMBER: 1
fun case1() {
val b = B(1)
b += 1
}
@@ -0,0 +1,42 @@
{
"2": {
"neg": {
"1": [
{
"specVersion": "0.1-253",
"casesNumber": 1,
"description": "An operator assignment A+\u003dB",
"unexpectedBehaviour": false
}
],
"2": [
{
"specVersion": "0.1-253",
"casesNumber": 1,
"description": "An operator assignment A+\u003dB",
"path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/neg/1.1.kt",
"unexpectedBehaviour": false
}
]
},
"pos": {
"1": [
{
"specVersion": "0.1-253",
"casesNumber": 1,
"description": "An operator assignment A+\u003dB",
"unexpectedBehaviour": false
}
],
"2": [
{
"specVersion": "0.1-253",
"casesNumber": 1,
"description": "An operator assignment A+\u003dB",
"path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,69 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: Both left-hand and right-hand sides of an assignment must be expressions
*/
/*
* TESTCASE NUMBER: 1
* NOTE: right-hand side of an assignment must be expression
*/
fun case1() {
val x = <!EXPRESSION_EXPECTED!>for (<!SYNTAX!><!>) { }<!>
val y = <!EXPRESSION_EXPECTED!>for (<!NAME_SHADOWING!>x<!> in 1..2) { }<!>
val a = <!EXPRESSION_EXPECTED!>while (<!SYNTAX!><!>) { }<!>
val b = <!EXPRESSION_EXPECTED!>while (false) { }<!>
val c = <!EXPRESSION_EXPECTED!>while (<!SYNTAX!><!>) <!>;
}
/*
* TESTCASE NUMBER: 2
* NOTE: right-hand side of an assignment must be expression
*/
fun case2() {
var x = <!EXPRESSION_EXPECTED!>for (<!SYNTAX!><!>) { }<!>
var y = <!EXPRESSION_EXPECTED!>for (<!NAME_SHADOWING!>x<!> in 1..2) { }<!>
var a = <!EXPRESSION_EXPECTED!>while (<!SYNTAX!><!>) { }<!>
var b = <!EXPRESSION_EXPECTED!>while (false) { }<!>
var c = <!EXPRESSION_EXPECTED!>while (<!SYNTAX!><!>) <!>;
}
/*
* TESTCASE NUMBER: 3
* NOTE: right-hand side of an assignment must be expression
*/
fun case3() {
var x :Any?
var y :Any?
var a :Any?
var b :Any?
var c :Any?
x = <!EXPRESSION_EXPECTED!>for (<!SYNTAX!><!>) { }<!>
y = <!EXPRESSION_EXPECTED!>for (<!NAME_SHADOWING!>x<!> in 1..2) { }<!>
a = <!EXPRESSION_EXPECTED!>while (<!SYNTAX!><!>) { }<!>
b = <!EXPRESSION_EXPECTED!>while (false) { }<!>
c = <!EXPRESSION_EXPECTED!>while (<!SYNTAX!><!>) <!>;
}
/*
* TESTCASE NUMBER: 4
* NOTE: left-hand side of an assignment must be expression
*/
fun case4() {
<!EXPRESSION_EXPECTED!>for (x in 1..2) {}<!> <!UNREACHABLE_CODE!>=<!> TODO();
<!UNREACHABLE_CODE!><!EXPRESSION_EXPECTED!>while (false) { }<!> = TODO()<!>
}
@@ -0,0 +1,41 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments -> paragraph 3 -> sentence 1
* statements, assignments, simple-assignments -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: Check the expression is not assignable if an identifier referring to an unmutable property
*/
/*
* TESTCASE NUMBER: 1
* NOTE: an identifier referring to a unmutable property
*/
fun case1() {
val x : Any
x = "0"
<!VAL_REASSIGNMENT!>x<!> = 1
x = 2.0
val y : Any = 0
<!VAL_REASSIGNMENT!>y<!> = "0"
y = 1.0
}
/*
* TESTCASE NUMBER: 2
* NOTE: an identifier referring to a unmutable property
*/
fun case2() {
val x : Any
mutableListOf(0).forEach({ <!CAPTURED_VAL_INITIALIZATION!>x<!> = it })
val y : Any = 1
mutableListOf(1).forEach({ <!VAL_REASSIGNMENT!>y<!> = it })
}
@@ -0,0 +1,59 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNSAFE_CALL -UNREACHABLE_CODE -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-222
* PLACE: statements, assignments -> paragraph 2 -> sentence 1
* RELEVANT PLACES: statements, assignments -> paragraph 3 -> sentence 2
* statements, assignments, simple-assignments -> paragraph 1 -> sentence 2
* NUMBER: 2
* DESCRIPTION: Check the expression is not assignable if a navigation expression referring to an unmutable property
*/
/*
* TESTCASE NUMBER: 1
* NOTE: a navigation expression referring to a unmutable property
*/
fun case1() {
val x : Case1? = Case1()
<!VAL_REASSIGNMENT!>x.x<!> = "0"
<!VAL_REASSIGNMENT!>x?.x<!> = "0"
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
}
class Case1{
val x : Any?
get() { TODO() }
}
/*
* TESTCASE NUMBER: 2
* NOTE: an identifier referring to a ununmutable property
*/
fun case2() {
val x : Case2? = Case2(null)
<!VAL_REASSIGNMENT!>x.x<!> = "0"
<!VAL_REASSIGNMENT!>x?.x<!> = "0"
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
}
class Case2(val x: Any?) {}
/*
* TESTCASE NUMBER: 3
* NOTE: an identifier referring to a ununmutable property
*/
fun case3() {
val x : Case3? = Case3()
<!VAL_REASSIGNMENT!>x.x<!> = "0"
<!VAL_REASSIGNMENT!>x?.x<!> = "0"
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
}
class Case3() {
val x: Any? = null
}
@@ -0,0 +1,15 @@
{
"1": {
"neg": {
"2": [
{
"specVersion": "0.1-222",
"casesNumber": 4,
"description": "Both left-hand and right-hand sides of an assignment must be expressions",
"path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-1/neg/2.1.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -1,7 +1,44 @@
{
"1": {
"neg": {
"2": [
{
"specVersion": "0.1-222",
"casesNumber": 4,
"description": "Both left-hand and right-hand sides of an assignment must be expressions",
"unexpectedBehaviour": false
}
]
}
},
"2": {
"neg": {
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 3,
"description": "Check the expression is not assignable if a navigation expression referring to an unmutable property",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-222",
"casesNumber": 2,
"description": "Check the expression is not assignable if an identifier referring to an unmutable property",
"unexpectedBehaviour": false
}
]
}
},
"3": {
"neg": {
"2": [
{
"specVersion": "0.1-222",
"casesNumber": 3,
"description": "Check the expression is not assignable if a navigation expression referring to an unmutable property",
"path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-2/neg/1.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 2,
@@ -16,6 +53,15 @@
"path": "compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/neg/1.1.kt",
"unexpectedBehaviour": false
}
],
"1": [
{
"specVersion": "0.1-222",
"casesNumber": 2,
"description": "Check the expression is not assignable if an identifier referring to an unmutable property",
"path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-2/neg/1.1.kt",
"unexpectedBehaviour": false
}
]
}
}

Some files were not shown because too many files have changed in this diff Show More