Fix common misspellings
This commit is contained in:
committed by
Nikolay Krasko
parent
33961acb8d
commit
686cfa6fd2
Vendored
+1
-1
@@ -26,7 +26,7 @@ fun threeLevelsReturnNoInitialization(x: Int?): Int? {
|
||||
// Inner always jumps to outer
|
||||
// And middle always calls inner
|
||||
// So, in fact, middle never finished normally
|
||||
// Hence 'y = 54' in middle is unreachable, and middle doesn't performs definite initalization
|
||||
// Hence 'y = 54' in middle is unreachable, and middle doesn't performs definite initialization
|
||||
// Hence, outer doesn't performs definite initialization
|
||||
val y: Int
|
||||
myRun outer@ {
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ fun outerFinallyInitializes() {
|
||||
// Not reported because of repeating diagnostic
|
||||
x = outerComputation()
|
||||
} catch (e: java.lang.Exception) {
|
||||
// can catch exception thrown by the inner, so x can be not initalized
|
||||
// can catch exception thrown by the inner, so x can be not initialized
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
log()
|
||||
} finally {
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ fun testTakeUnless(x: Int?) {
|
||||
fun testRepeatOnVal(x: Int) {
|
||||
val y: Int
|
||||
repeat(x) {
|
||||
// reassignment instead of captured val initalization
|
||||
// reassignment instead of captured val initialization
|
||||
<!VAL_REASSIGNMENT!>y<!> = 42
|
||||
}
|
||||
println(<!UNINITIALIZED_VARIABLE!>y<!>)
|
||||
|
||||
Reference in New Issue
Block a user