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