[FIR-TEST] Update testdata due to unresolved KT-36056
This commit is contained in:
+5
-5
@@ -45,7 +45,7 @@ fun outerFinallyInitializes() {
|
||||
}
|
||||
|
||||
// Properly initialized
|
||||
x.inc()
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
}
|
||||
|
||||
fun innerFinallyInitializes() {
|
||||
@@ -62,14 +62,14 @@ fun innerFinallyInitializes() {
|
||||
}
|
||||
|
||||
// Properly initialized
|
||||
x.inc()
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
} catch (e: java.lang.Exception) {
|
||||
log()
|
||||
}
|
||||
|
||||
// Still can be unitialized because we don't know what can happen in try-block
|
||||
// (e.g., OutOfMemory exception could've happened even before myRun was executed)
|
||||
x.inc()
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
}
|
||||
|
||||
|
||||
@@ -87,12 +87,12 @@ fun innerFinallyInitializesOuterRethrows() {
|
||||
}
|
||||
|
||||
// Properly initialized
|
||||
x.inc()
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
} catch (e: java.lang.Exception) {
|
||||
log()
|
||||
throw e
|
||||
}
|
||||
|
||||
// Guaranteed to be initialized because all catch-clauses are rethrowing
|
||||
x.inc()
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
}
|
||||
+2
-2
@@ -30,7 +30,7 @@ fun innerTryCatchInitializes() {
|
||||
}
|
||||
}
|
||||
// Can get here only when inlined lambda exited properly, i.e. x is initialized
|
||||
x.inc()
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
outerComputation()
|
||||
|
||||
} catch (e: java.lang.Exception) {
|
||||
@@ -43,5 +43,5 @@ fun innerTryCatchInitializes() {
|
||||
x = 42
|
||||
}
|
||||
// Here x=I because outer try-catch either exited normally (x=I) or catched exception (x=I, with reassingment, though)
|
||||
x.inc()
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
}
|
||||
+1
-1
@@ -26,7 +26,7 @@ fun throwIfNotCalled() {
|
||||
}
|
||||
// x *is* initialized here, because if myRun was never called -> exception
|
||||
// were thrown and control flow wouldn't be here
|
||||
println(x)
|
||||
println(<!UNINITIALIZED_VARIABLE!>x<!>)
|
||||
}
|
||||
|
||||
fun catchThrowIfNotCalled() {
|
||||
|
||||
Vendored
+2
-2
@@ -43,7 +43,7 @@ fun possibleReassignmentInTryCatch() {
|
||||
}
|
||||
x.inc()
|
||||
}
|
||||
x.inc()
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
}
|
||||
|
||||
fun tryCatchOuter() {
|
||||
@@ -53,6 +53,6 @@ fun tryCatchOuter() {
|
||||
x.inc()
|
||||
}
|
||||
catch (e: java.lang.Exception) {
|
||||
x.inc()
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -30,5 +30,5 @@ fun innerTryCatchFinally() {
|
||||
}
|
||||
}
|
||||
|
||||
x.inc()
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
}
|
||||
Reference in New Issue
Block a user