[FIR] Update testdata of FIR spec tests
This commit is contained in:
@@ -2,6 +2,15 @@
|
||||
// !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 (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 62
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
@@ -145,7 +154,7 @@ fun case_10(x: Any): String {
|
||||
*/
|
||||
fun case_11(x: Any?): String? {
|
||||
if (x is Nothing?) {
|
||||
return when(x) {
|
||||
return <!NO_ELSE_IN_WHEN!>when<!>(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
@@ -159,7 +168,7 @@ fun case_11(x: Any?): String? {
|
||||
*/
|
||||
fun case_12(x: Any?): String? {
|
||||
if (x == null) {
|
||||
return when(x) {
|
||||
return <!NO_ELSE_IN_WHEN!>when<!>(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
@@ -173,7 +182,7 @@ fun case_12(x: Any?): String? {
|
||||
*/
|
||||
fun case_13(x: Any?): String? {
|
||||
if (x === null) {
|
||||
return when(x) {
|
||||
return <!NO_ELSE_IN_WHEN!>when<!>(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
@@ -187,7 +196,7 @@ fun case_13(x: Any?): String? {
|
||||
*/
|
||||
fun case_14(x: Any?): String? {
|
||||
x as Nothing?
|
||||
return when(x) {
|
||||
return <!NO_ELSE_IN_WHEN!>when<!>(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user