[Spec tests] Updating tests for kotlin 1.4.0
This commit is contained in:
committed by
Victor Petukhov
parent
ab3b63c92a
commit
1caafdc9d4
Vendored
+18
@@ -50,3 +50,21 @@ fun case2() {
|
||||
if (<!TYPE_MISMATCH, TYPE_MISMATCH!>a<!>) { "true" } else "false"
|
||||
checkSubtype<Boolean>(<!TYPE_MISMATCH!>a<!>)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
// FILE: JavaClassCase3.java
|
||||
public class JavaClassCase3{
|
||||
public static <T> T id(T x) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: KotlinClassCase3.kt
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case3() {
|
||||
val x = JavaClassCase3.id(null) // Nothing!
|
||||
<!DEBUG_INFO_CONSTANT, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>x<!>
|
||||
val a = if (<!DEBUG_INFO_CONSTANT, TYPE_MISMATCH, TYPE_MISMATCH!>x<!>) {
|
||||
"NOK"
|
||||
} else "NOK"
|
||||
}
|
||||
Vendored
+55
-1
@@ -4,7 +4,7 @@
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-218",
|
||||
"casesNumber": 2,
|
||||
"casesNumber": 3,
|
||||
"description": "The type of the condition expression must be a subtype of kotlin.Boolean",
|
||||
"unexpectedBehaviour": true
|
||||
}
|
||||
@@ -20,5 +20,59 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"4": {
|
||||
"pos": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-152",
|
||||
"casesNumber": 0,
|
||||
"description": "Kt10811",
|
||||
"path": "compiler/testData/diagnostics/tests/when/kt10811.kt",
|
||||
"unexpectedBehaviour": false
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-152",
|
||||
"casesNumber": 0,
|
||||
"description": "Kt9972",
|
||||
"path": "compiler/testData/diagnostics/tests/when/kt9972.kt",
|
||||
"unexpectedBehaviour": false
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-152",
|
||||
"casesNumber": 0,
|
||||
"description": "Kt10809",
|
||||
"path": "compiler/testData/diagnostics/tests/when/kt10809.kt",
|
||||
"unexpectedBehaviour": false
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-152",
|
||||
"casesNumber": 0,
|
||||
"description": "Kt10439",
|
||||
"path": "compiler/testData/diagnostics/tests/when/kt10439.kt",
|
||||
"unexpectedBehaviour": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"5": {
|
||||
"pos": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-152",
|
||||
"casesNumber": 0,
|
||||
"description": "Kt9972",
|
||||
"path": "compiler/testData/diagnostics/tests/when/kt9972.kt",
|
||||
"unexpectedBehaviour": false
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-152",
|
||||
"casesNumber": 0,
|
||||
"description": "Kt10439",
|
||||
"path": "compiler/testData/diagnostics/tests/when/kt10439.kt",
|
||||
"unexpectedBehaviour": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user