FIR: Adjust testData for spec tests: statements

This commit is contained in:
Denis Zharkov
2020-04-16 12:23:53 +03:00
parent 0df6354896
commit 798fe9b7d1
6 changed files with 263 additions and 0 deletions
@@ -0,0 +1,29 @@
// !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, loop-statements, while-loop-statement -> paragraph 3 -> sentence 1
* RELEVANT PLACES: statements, loop-statements, while-loop-statement -> paragraph 1 -> sentence 1
* NUMBER: 1
* DESCRIPTION: condition expression is not a subtype of kotlin.Boolean.
* HELPERS: checkType
*/
// FILE: KotlinClass.kt
// TESTCASE NUMBER: 1
fun case1() {
val condition: Any = true
while (condition && "true") {
}
}
// TESTCASE NUMBER: 2
fun case2() {
val condition: Boolean? = true
while (condition) {
}
}