FIR checker: report val reassignment
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
b128577508
commit
f1fa290d49
+2
-2
@@ -22,7 +22,7 @@ fun assignedInTryAndFinally() {
|
||||
try {
|
||||
a = 42
|
||||
} finally {
|
||||
a = 41
|
||||
<!VAL_REASSIGNMENT!>a<!> = 41
|
||||
}
|
||||
a.hashCode()
|
||||
}
|
||||
@@ -33,7 +33,7 @@ fun sideEffectBeforeAssignmentInTryButNotFinally(s: Any) {
|
||||
s as String // Potential cast exception
|
||||
a = 42
|
||||
} finally {
|
||||
a = 41
|
||||
<!VAL_REASSIGNMENT!>a<!> = 41
|
||||
}
|
||||
a.hashCode()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user