Commit Graph

30 Commits

Author SHA1 Message Date
Mikhail Glukhikh 5062ce2804 Regression: correct smart cast from Type? to Type! 2016-01-28 17:08:15 +03:00
Mikhail Glukhikh e9af4d25d0 Handling of try / catch / finally with 'Nothing' in all catch blocks #KT-10735 Fixed 2016-01-22 16:37:22 +03:00
Mikhail Glukhikh 366ab508e1 Data flow analysis: assignment of null makes variable effectively of type 'Nothing?' 2016-01-22 16:37:10 +03:00
Ilya Gorbunov f4822cd757 Fix testData in compiler: add collections and ranges package to fq-names. 2016-01-22 05:54:38 +03:00
Mikhail Glukhikh 9a6d4c32c5 More accurate handling of "always null" for receivers 2015-11-25 18:26:15 +03:00
Mikhail Glukhikh 89e56093a2 Limit "always null" scope: only for !!, is and dot; senseless comparison rolled back; "smart constant" information for nulls #KT-10029 Fixed 2015-11-25 18:26:08 +03:00
Mikhail Glukhikh 2d9fbf5696 Always null detection 2015-11-09 16:36:34 +03:00
Mikhail Glukhikh 41ebfd025e More precise diagnostics of smart cast impossible #KT-7240 Fixed 2015-11-03 13:38:51 +03:00
Alexey Tsvetkov 1973573a89 Remove @data from test data 2015-10-19 20:45:00 +03:00
Mikhail Glukhikh 4b35e3b135 Preliminary declaration visitor for estimating local variable's predictability for smart casts
Predictability estimation algorithm is completely new, but backward compatibility should present.
A large set of tests. Some updated tests.
Smart casts allowed for captured variables if they are not modified in closure #KT-9051 Fixed
Also #KT-8643 Fixed
Also #KT-7976 Fixed
Correct handling of lambda arguments in functions #KT-9143 Fixed
2015-10-16 20:47:47 +03:00
Denis Zharkov bd37a10677 Transform *Array.size to properties 2015-10-16 18:16:02 +03:00
Denis Zharkov f0e3fd617d Adjust testData to CharSequence.length transformation 2015-10-14 20:39:35 +03:00
Yan Zhulanow 275f3f8954 'operator' checks 2015-10-14 01:29:10 +03:00
Denis Zharkov cfc9d19825 Transform Collection.isEmpty and Map.Entry.key/value to properties 2015-10-10 12:29:14 +03:00
Yan Zhulanow 6db9344659 Fix compiler tests 2015-09-25 19:20:20 +03:00
Denis Zharkov 4850fd10f0 Regenerate test data containing rendered descriptors
Introduced '@' after each annotation
2015-09-18 10:14:39 +03:00
Michael Nedzelsky bc5c9065d2 fix tests in org.jetbrains.kotlin.checkers 2015-09-08 02:04:32 +03:00
Mikhail Glukhikh 5723c2a077 Front-end fix: result type corrected for increment / decrement expressions. Smart cast allowed on a postfix increment result. See KT-7561.
Now result type is receiver type for postfix increment, or increment result type for prefix increment.
A set of relevant tests.
2015-05-26 15:20:25 +03:00
Mikhail Glukhikh 60fdfb8441 Bug fix: DataFlowInfo.getCompleteTypeInfo (with a test) 2015-04-28 15:16:36 +03:00
Mikhail Glukhikh 109e0abb6d Review fixes for mutable variable smart casting (mostly refactoring).
DataFlowValue.isPredictable() introduced instead of isStableIdentifier().
Parenthesized assignments are treated correctly.
2015-04-16 20:11:03 +03:00
Mikhail Glukhikh d5aed62410 Smart casts for local variables not captured in a closure and not changed in a loop, see #KT-3175.
isLocalVariable added. Assignment / initialization analysis.
Control whether a variable is changed in a loop at the beginning and at the end of the loop.
Control whether a variable is captured in a closure. #KT-3175  Fixed. #KT-2266  Fixed.
Tests for variable null safety and for variables is/as operations.
Loop / closure / variable property tests are included.
Old tests changed in accordance with KT-3175. In particular, all three of testSmartcastImpossible were fixed.
2015-04-16 20:10:58 +03:00
Mikhail Glukhikh 1544755838 Test refactoring 2015-04-14 19:11:26 +03:00
Mikhail Glukhikh 27b1f1ddad Test and implementation for KT-6819. Now when entry condition data flow information is used for subsequent conditions. #KT-6819 Fixed 2015-04-07 19:03:34 +03:00
Mikhail Glukhikh cd206fc97b Test for KT-3711. Passes already in M11 or even earlier 2015-04-07 19:03:31 +03:00
Mikhail Glukhikh 221501c0d9 Tests for KT-2865. Passes already in M11 or even earlier 2015-04-07 19:03:29 +03:00
Mikhail Glukhikh 39e01f4df2 Tests for KT-3899. Passes already in M11 or even earlier 2015-04-07 19:03:27 +03:00
Mikhail Glukhikh f49c79f4f0 Tests for KT-3224 and KT-3244. Both pass already in M11 or even earlier 2015-04-07 19:03:24 +03:00
Mikhail Glukhikh 88441814b9 Test for KT-5502 (works after KT-4450 / KT-5907 fix) 2015-04-06 18:32:19 +03:00
Mikhail Glukhikh 620b7954ac Tests for already working KT-3993 and KT-5427. These test cases pass at least since M11 2015-03-31 17:15:46 +03:00
Mikhail Glukhikh 9c1551bca9 Implementation of smart casts for public / protected immutable properties that are not open and used in the same module.
DataFlowValueFactory and its environment refactoring: containing declaration is added into factory functions
as an argument and used to determine identifier stability. A few minor fixes. #KT-5907 Fixed. #KT-4450 Fixed. #KT-4409 Fixed.

New tests for KT-4409, KT-4450, KT-5907 (public and protected value properties used from the same module or not,
open properties, variable properties, delegated properties, properties with non-default getter).
Public val test and KT-362 test changed accordingly.
2015-03-31 16:19:03 +03:00