FIR: Adjust testData for spec tests: dfa

This commit is contained in:
Denis Zharkov
2020-04-15 13:06:26 +03:00
parent 86e1aadd31
commit 0d34299b7a
118 changed files with 31269 additions and 0 deletions
@@ -0,0 +1,32 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_EXPRESSION -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (NEGATIVE)
*
* SECTIONS: dfa
* NUMBER: 40
* DESCRIPTION: Raw data flow analysis test
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
*/
/*
* TESTCASE NUMBER: 1
* ISSUES: KT-8819
*/
fun case_1(x: Pair<*, *>) {
if (x.first !is String) return
x.first
x.first.length
}
/*
* TESTCASE NUMBER: 2
* ISSUES: KT-8819
*/
fun case_2(x: Pair<*, *>) {
if (x.first !is String?) throw Exception()
x.first
x.first?.length
}