Commit Graph

67 Commits

Author SHA1 Message Date
Alexey Sedunov 9fee8600cb Pseudocode: Do not generate implicit return instruction inside of
Unit-typed lambdas
 #KT-5549 Fixed
2014-08-05 18:14:40 +04:00
Svetlana Isakova 4477a96ca7 Resolve operation (unary, array access) on error element instead of ignoring it
(to record corresponding call for later simplification in control flow)
Generate code for unmapped arguments in control flow
2014-07-30 17:14:00 +04:00
Alexey Sedunov 9cbcabffa4 Control-Flow Analysis: Reuse pseudo-value information for unused expression analysis 2014-07-28 13:07:37 +04:00
Alexey Sedunov 1c75a5f642 Pseudocode: Generate instructions for superclass constructor calls. Consume value of delegate expression in the by-clause 2014-07-11 19:13:21 +04:00
Svetlana Isakova 0673dc51d6 Test for KT-3162 More precise try-finally error marking
#KT-3162 Obsolete
2014-06-24 16:14:07 +04:00
Svetlana Isakova 8680ff4e88 Do not mark comment next to reachable child as unreachable 2014-06-24 16:14:06 +04:00
Svetlana Isakova 9d4aad3bbc Extracted 'generateBooleanOperation'
Generate magic instruction for '&&, ||' in condition as well
2014-06-21 12:26:34 +04:00
Svetlana Isakova 4279da12f5 KT-5200 Mark unreachable code in lambdas
#KT-5200 Fixed
2014-06-21 12:26:33 +04:00
Svetlana Isakova 17c4930404 KT-2334 An error 'local function without body' is not reported
#KT-2334 Fixed
2014-06-21 12:26:33 +04:00
Svetlana Isakova 79cec6411d Mark only unreachable parts of element if it has reachable parts
like for 'return todo()' mark only 'return'
2014-06-21 12:26:33 +04:00
Alexey Sedunov d2c055e9da Pseudocode: Introduce pseudo-value analysis 2014-06-03 18:17:05 +04:00
Andrey Breslav 4b5a192e4c Don't add primary constructors parameters for properties 2014-03-26 21:10:27 +04:00
Svetlana Isakova fbbfb95861 added 'mergeDataWithLocalDeclarations' option
for collecting variable data for pseudocode

  removed using data from outer context
  for local declarations for 'variable initializers' analysis
2014-03-07 21:08:18 +04:00
Svetlana Isakova 7d46ff951e Jump after 'for' cycle to loop parameter change.
Not to the cycle body.
2014-03-07 21:08:17 +04:00
Svetlana Isakova 791fa22abb KT-4405 Control-flow analysis is not performed for some local declarations #KT-4405 Fixed 2014-02-12 12:48:13 +04:00
Svetlana Isakova aa713ef1f6 generate pseudocode for property accessor only if the property is local
otherwise check it independently like a function
2014-02-12 12:48:12 +04:00
Svetlana Isakova 5ef320173c generate pseudocode for functions in local classes
#KT-4405 In progress
 #KT-3501 Fixed
2014-02-11 21:07:10 +04:00
Evgeny Gerashchenko c924a5d097 Test for KT-3444 Front-end doesn't check if local function or function of anonymous class returns value
#KT-3444 obsolete
2014-01-14 19:13:19 +04:00
Svetlana Isakova c30259dfbe added info about smart casts to diagnostic tests 2013-12-11 19:53:50 +04:00
Svetlana Isakova 8e27877817 check definite return in local functions 2013-12-05 15:51:57 +04:00
Svetlana Isakova d27c8b7d61 added test for obsolete task
#KT-4034 Fixed
2013-12-05 15:51:57 +04:00
Andrey Breslav 9efa604cff Revert 4ca90e9c68 2013-12-05 14:04:50 +04:00
Andrey Breslav 4ca90e9c68 Proper instructions for elvis operator
We should not mark elvis operator unused, for the rhs may have desired side-effects
2013-12-05 13:28:41 +04:00
Andrey Breslav 11fcd64949 Mark expressions for correct recognition by "unreachable code" 2013-12-05 13:02:17 +04:00
Andrey Breslav b15b075484 Tests for bug in CFA: no return in when() is now detected 2013-12-05 13:02:15 +04:00
svtk c1ec8cbde9 check Nothing type for all expressions not only for calls and simple names
(but excluding statement expressions)
2013-11-22 18:57:58 +04:00
Evgeny Gerashchenko b9e5704057 Updated test data and stdlib sources. 2013-02-13 18:08:37 +04:00
Svetlana Isakova a5cf54d370 do not miss repeated 'uninitialized' error for properties 2012-12-18 19:47:55 +04:00
Svetlana Isakova 67d0d8b1a9 fix: val can be reassigned through backing field inside its own getter 2012-12-18 19:47:54 +04:00
Svetlana Isakova 58de1cabbc update tests according to package properties check 2012-12-18 19:47:54 +04:00
Svetlana Isakova 11bc01795f check package declaration in a file
to have the right properties initialization order
not to report errors if isDeclaredLocally (only recordInitializedVariables)
2012-12-18 19:47:54 +04:00
Svetlana Isakova f697098fb4 KT-2960 Perform control flow checks for package property initializers
#KT-2960 fixed
2012-12-18 19:47:52 +04:00
Svetlana Isakova d7a60f5fed added tests for KT-2369, KT-2585 and KT-2972
KT-2369 Variable is not marked as uninitialized in 'finally' section
 #KT-2369 fixed
KT-2585 Code in try-finally is incorrectly marked as unreachable
 #KT-2585 fixed
KT-2972 Wrong "unused value" warning when finally is present
 #KT-2972 fixed
2012-12-18 16:00:26 +04:00
Svetlana Isakova 93327a3e31 check uninitialized vars inside local declarations
added parameter 'includeInsideLocalDeclarations' to getDeclaredVariables
2012-12-18 16:00:26 +04:00
Svetlana Isakova 8141229744 added edge from try start to error through finally block
KT-2845 Wrong cf-analysys for variable initialization in try..finally
 #KT-2845 fixed
todo: some errors now are reported for several times (each time when analyzing finally block)
2012-12-18 16:00:25 +04:00
Pavel V. Talanov a7536e1ae9 Fix ClassCastException introduced in https://github.com/JetBrains/kotlin/commit/8d501bd7f4f1093bcf29165755aff3f2a945c88a 2012-11-21 21:05:30 +04:00
Svetlana Isakova d0a6f6252d fixed: DEBUG_INFO_ERROR_ELEMENT should be visible in tests 2012-11-20 19:53:03 +04:00
Svetlana Isakova 5da98b2bf0 KT-2330 Check visibility of getters and setters correspondingly
#KT-2330 fixed
2012-10-16 16:00:22 +04:00
Alex Tkachman e2d514907a annotations for j.u.c.locks + related fixes of tests 2012-09-26 18:52:46 +02:00
Evgeny Gerashchenko 5de734c9f3 Replaced sure() invocations with '!!' operator in diagnostic tests. 2012-09-17 18:00:21 +04:00
Svetlana Isakova 7c828b9ff7 diagnostic tests changes after collections mapping 2012-09-05 18:55:16 +04:00
Pavel V. Talanov 22be002ef4 Remove enums inheriting from enums from test data. 2012-08-29 16:00:50 +04:00
Pavel V. Talanov 6a71d495dd Constructors for enum entries and class objects have private visibility: test data changed. 2012-08-29 15:58:19 +04:00
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00
Svetlana Isakova 2971c1630e KT-2166 Control flow analysis doesn't detect that a 'while(true)' loop never terminates
KT-2103 Compiler requires return statement after loop which never exits
 #KT-2166 Fixed
 #KT-2103 Fixed
2012-06-09 13:33:25 +04:00
Svetlana Isakova 9ede882cd5 KT-2226 Parameter used as delegation by object marked as unused
#KT-2226 fixed
2012-06-09 13:33:25 +04:00
Andrey Breslav 91606a3901 Introduce 'reified' instead of 'erased' 2012-06-05 20:19:07 +04:00
Andrey Breslav febb3c6a3d Recovery set extended
#KT-2172 Fixed
2012-06-04 18:44:09 +04:00
Svetlana Isakova 84d60b8baa check deeply inner local declarations added 2012-05-28 15:21:40 +04:00
Svetlana Isakova b49fa2ab82 KT-1977 Wrong 'unused expression' in catch
#KT-1977 fixed
2012-05-18 15:19:38 +04:00