Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts
Dmitry Savvinov 6065095e24 Fix too aggressive data-flow clearing of loop-assigned vars
This is effectively a revert of
447c127036, which was an (incorrect) fix
for KT-22379.

The bug was that we've cleared data-flow info for assigned variables
*after* knowledge that loop condition if 'false' was applied (we can
claim that if loop has no jump-outs). Therefore, we broke smartcasts in
the innocent code like that:

  var x: Int? = null
  while (x == null) {
      x = readPotentiallyNullableInt()
  }
  // x should be non-null here

Commit reverts that "fix" for 1.3.0 and postpones deprecation until 1.4

KT-22379 Open
KT-27084 Fixed
2018-09-27 12:09:22 +03:00
..
2015-10-07 15:50:23 +03:00
2015-10-07 15:50:23 +03:00
2015-11-09 16:36:34 +03:00
2015-11-09 16:36:34 +03:00
2017-11-29 02:54:26 +03:00
2015-10-07 15:50:23 +03:00
2016-09-15 16:45:48 +03:00
2015-10-07 15:50:23 +03:00
2016-09-15 16:45:48 +03:00
2017-05-15 11:24:35 +03:00
2015-10-19 20:45:02 +03:00
2015-10-19 20:45:02 +03:00
2015-10-19 20:45:02 +03:00