[Spec tests] Updating tests for kotlin 1.4.0

This commit is contained in:
anastasiia.spaseeva
2019-12-02 17:20:28 +03:00
committed by Victor Petukhov
parent ab3b63c92a
commit 1caafdc9d4
46 changed files with 707 additions and 833 deletions
@@ -1,4 +1,3 @@
// !LANGUAGE: +NewInference
// FULL_JDK
// WITH_RUNTIME
@@ -13,24 +12,17 @@
// FILE: JavaClass.java
public class JavaClass{
public static <T> T id(T x) {
return null;
}
public Boolean x;
}
// FILE: KotlinClass.kt
import java.lang.IllegalStateException
fun box(): String {
val x = JavaClass.id(null) // Nothing!
return try {
val a = if (x) {
"NOK"
} else "NOK"
val a = if (JavaClass().x) { "NOK" } else "NOK"
a
} catch (e: java.lang.IllegalStateException) {
} catch (e: java.lang.NullPointerException) {
"OK"
}
}
@@ -1,28 +0,0 @@
// FULL_JDK
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-220
* PLACE: expressions, conditional-expression -> paragraph 6 -> sentence 1
* NUMBER: 2
* DESCRIPTION: The type of the condition expression must be a subtype of kotlin.Boolean, otherwise it is an error
*/
// FILE: JavaClass.java
public class JavaClass{
public Boolean x;
}
// FILE: KotlinClass.kt
import java.lang.IllegalStateException
fun box(): String {
return try {
val a = if (JavaClass().x) { "NOK" } else "NOK"
a
} catch (e: java.lang.IllegalStateException) {
"OK"
}
}
@@ -2,12 +2,6 @@
"6": {
"pos": {
"1": [
{
"specVersion": "0.1-220",
"casesNumber": 0,
"description": "The type of the condition expression must be a subtype of kotlin.Boolean, otherwise it is an error",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-220",
"casesNumber": 0,