[FIR] Add checker for uninitialized properties
This commit is contained in:
+1
-1
@@ -18,5 +18,5 @@ fun bar(a: Boolean, b: Boolean): Int {
|
||||
when (b) {
|
||||
false -> x = 3
|
||||
}
|
||||
return x
|
||||
return <!UNINITIALIZED_VARIABLE!>x<!>
|
||||
}
|
||||
+1
-1
@@ -18,5 +18,5 @@ fun bar(a: Boolean, b: Boolean): Int {
|
||||
when (b) {
|
||||
false -> x = 3
|
||||
}
|
||||
return x
|
||||
return <!UNINITIALIZED_VARIABLE!>x<!>
|
||||
}
|
||||
+1
-1
@@ -12,7 +12,7 @@ fun testSimpleValInWhenSubject() {
|
||||
|
||||
fun testValWithoutInitializerWhenSubject() {
|
||||
when (val y: Any) {
|
||||
is String -> y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
is String -> <!UNINITIALIZED_VARIABLE!>y<!>.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user