Add various tests for DFA testing

This commit is contained in:
victor.petukhov
2019-02-14 12:36:51 +03:00
parent 15e3482eec
commit 86bb5d689d
146 changed files with 31180 additions and 8508 deletions
@@ -0,0 +1,25 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
*
* SECTIONS: dfa
* NUMBER: 60
* DESCRIPTION: Raw data flow analysis test
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
*/
// TESTCASE NUMBER: 1
fun case_1() {
var x: String? = null
outer@ while (x != null) {
inner@ do {
x = null
} while (x == null)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?"), DEBUG_INFO_SMARTCAST!>x<!>.length
}
}