Commit Graph

185 Commits

Author SHA1 Message Date
Denis Zharkov 59f2ba98a6 Avoid creating SimpleType instances for default type 2017-07-20 10:53:09 +03:00
Mikhail Glukhikh c0e1b3ef2d CFG: fix label binding for last instruction of finally block
So #KT-18698 Fixed
2017-07-18 14:37:13 +03:00
Denis Zharkov 02b40326cc Fix incorrect coroutines codegen behavior
If all the suspension calls in a suspend function were "hidden"
under the for-convention (iterator/next/hasNext) calls,
control-flow didn't find them, thus supposing that there is no
suspension points and there is no need to generate a coroutine state machine

The solution is to add relevant calls to CFG

 #KT-15824 Fixed
2017-01-25 13:54:01 +03:00
Mikhail Glukhikh b81268cca1 Control-flow analysis: do-while scope is ended after condition but before jump #KT-15334 Fixed 2017-01-10 17:57:43 +03:00
Alexey Sedunov a414843f54 Control-Flow Analysis: Use PSI to generate pseudocode if nested resolved call is confused with outer one (e.g. a {} when invoke() is missing)
#KT-14500 Fixed
2016-11-07 20:03:36 +03:00
Alexey Sedunov 0159ddbc49 Control-Flow Analysis: Do not skip pseudocode for value arguments if they are matched with errors 2016-11-07 20:03:34 +03:00
Nikolay Krasko 08d628537c Assign trailing and preceding whitespaces to lambda block until the last comment in parser 2016-10-27 14:26:10 +03:00
Valentin Kipyatkov 8baa9ba1de No parameter names in type of lambda expression and anonymous function 2016-10-11 23:38:54 +03:00
Valentin Kipyatkov 41ee06ec96 Use parameter names in DescriptorRenderer 2016-10-11 23:38:49 +03:00
Mikhail Glukhikh f8039249c6 CFA: additional jumps to catch / finally generated in the end of try / before exits from try #KT-5469 Fixed
Also #KT-13612 Fixed
(cherry picked from commit 7c188b3)
2016-08-31 19:28:09 +03:00
Mikhail Glukhikh 25eefdb6ec Pseudocode label now cannot be bound to a non-owning pseudocode #KT-13555 Fixed
Also EA-77641 Fixed
(cherry picked from commit 07643ce)
2016-08-25 10:32:04 +03:00
Ilya Gorbunov b69661df8f Pseudocode and CFG changed after 'let' is resolved correctly. 2016-08-17 12:40:50 +03:00
Ilya Gorbunov 58a010464a Exception typealiases rendering in test output (CFG) 2016-08-17 12:40:50 +03:00
Mikhail Glukhikh 1c5c6506ce Report of UNINITIALIZED_ENUM_COMPANION also for implicit receivers #KT-11769 Fixed 2016-08-12 15:06:43 +03:00
Mikhail Glukhikh 04f71bccf2 KT-11769 case with companion function call: error is now detected if companion receiver is stated explicitly 2016-08-12 15:06:38 +03:00
Mikhail Glukhikh 13e64c18d9 Correct CFA order for enums: first own members, then entries, and at last companion object members #KT-6054 Fixed
(cherry picked from commit 94d3b4c)
2016-08-09 10:28:27 +03:00
Mikhail Glukhikh 35446037bb UNINITIALIZED_ENUM_ENTRY compiler warning introduced #KT-2349 Fixed
(cherry picked from commit 76ac6d1)
2016-08-08 17:47:56 +03:00
Mikhail Glukhikh b7ed68db05 CFA: No more UNRESOLVED_CALL for object / enum entry qualifiers
(cherry picked from commit 4b09de8)
2016-08-08 17:47:40 +03:00
Stanislav Erokhin 03241419bd Minor. removed several tests with error calls. 2016-06-10 21:28:04 +03:00
Alexander Udalov e2d6e0cbab Propagate control flow to bound double colon expressions
"Unused expression" should be reported on unused double colon expressions, this
is postponed

 #KT-12551 Open
2016-06-07 12:42:42 +03:00
Dotlin fa523b9af4 Delegated Properties: Analysis adjustments for local delegated properties support 2016-05-13 19:11:18 +03:00
Mikhail Glukhikh b7e8f71367 Fix of getCorrespondingLoop for complex loop / try-finally trees #KT-8246 Fixed 2016-03-30 18:49:23 +03:00
Mikhail Glukhikh b975b7d26e More accurate CFG for local class constructors (now they are not considered unconditionally executed) #KT-10042 Fixed 2016-03-23 15:04:05 +03:00
Mikhail Glukhikh 569a5888ff do...while (true) is now considered infinite loop in CFA #KT-3896 Fixed
Also #KT-3883 Fixed
Also #KT-4986 Fixed
2016-03-14 16:13:14 +03:00
Mikhail Glukhikh 17593e4ef6 Call completer: safe call with nullable receiver has nullable return type #KT-11007 Fixed 2016-02-13 10:48:07 +03:00
Mikhail Glukhikh a08b8f43b2 Control flow graph for safe calls corrected #KT-10913 Fixed
Also #KT-10186 Fixed
Also #KT-5198 Fixed
2016-02-10 12:29:45 +03:00
Mikhail Glukhikh 45298e0bad Delegated properties now cannot be used before initialization #KT-10869 Fixed 2016-02-02 16:27:20 +03:00
Ilya Gorbunov b97e436a50 Fix deprecated Range and Progression usages in testData 2016-01-22 05:54:38 +03:00
Mikhail Glukhikh b805ce06c2 CFG exhaustive when else instruction for KT-8700 2015-12-26 10:46:01 +03:00
Ilya Gorbunov 4dde59368c Fix tests not to duplicate array constructor definitions as they are available now in builtins. 2015-12-14 04:29:18 +03:00
Stanislav Erokhin dd24fd47f7 Update control flow test data for tower resolution algorithm
- locals win
- drop old invokeExtension convention
2015-12-11 17:01:02 +03:00
Mikhail Glukhikh ea3a65d0b8 Additional tests for KT-10243 2015-12-02 18:14:59 +03:00
Alexey Sedunov b75665a96a Misc: Do not use resolved call of outer expression if current call expression has no callee
#KT-10105 Fixed
2015-11-24 14:03:42 +03:00
Mikhail Glukhikh d6988ad69e Get rid of FIELD_IDENTIFIER at syntax level, two errors dropped, a set of tests fixed / deleted #KT-9539 Fixed 2015-10-21 16:36:55 +03:00
Valentin Kipyatkov 487501a7a4 Fixed test data after changes in parser 2015-10-15 19:20:08 +03:00
Yan Zhulanow d52f245cf7 Rename unary plus/minus in builtins and stdlib 2015-10-15 18:23:58 +03:00
Alexander Udalov 51bf68ce27 Update compiler tests to use KProperty instead of PropertyMetadata 2015-10-14 20:45:54 +03:00
Andrey Breslav 045df48588 Minor. TRAIT -> INTERFACE 2015-10-12 14:40:48 +03:00
Dmitry Jemerov 1523d5bcbf removing static type assertions work in progress 2015-10-12 11:11:23 +02:00
Yan Zhulanow 1f2b4e20fe Replace get() and set() to getValue() and setValue() (property delegates) 2015-10-09 22:49:16 +03:00
Denis Zharkov e9cd9db2a7 Adjust testData after contains transformation 2015-10-09 14:40:34 +03:00
Dmitry Jemerov 7c20630272 diagnostics for deprecated syntax of function type parameter list 2015-10-06 16:20:47 +02:00
Denis Zharkov 73799e2c3c Replace deprecated lambda syntax in testData
It's done with similar constructions where possible trying to preserve
intended behavior.
Some usages are removed because they test exactly the feature that
we are going to drop soon.
2015-09-25 08:29:25 +03:00
Denis Zharkov 9254b1b461 Deprecate tailRecursive in favor of tailrec 2015-09-04 17:23:26 +03:00
Alexey Sedunov df07a61a08 Control-Flow: Generate instruction for left-hand side of invalid assignments
#KT-8390 Fixed
2015-07-10 19:27:53 +03:00
Alexey Sedunov b6ea2d4fd4 Control-Flow: Compute type predicates for arguments of unresolved calls 2015-05-26 19:29:04 +03:00
Alexey Sedunov 3d3b5591e1 Control-Flow: Improve debug text of ReadValueInstruction 2015-05-26 19:28:09 +03:00
Alexey Sedunov 868329e3cb Control-Flow: Fix pseudocode generation for combined get/set and invoke conventions
#KT-4462 Fixed
 #KT-4681 Fixed
2015-05-26 19:28:07 +03:00
Alexander Udalov 2186ce5e8d Degrade CFG test on values of extension function type
Apparently type annotations ('kotlin.extension' in particular) are lost
somewhere in control-flow values processor at the moment, so types may not be
as precise as they were when functions and extension functions had different
classifiers.

This test presumably only affects IDE functionality like 'Extract Method' in a
way that it will suggest a slightly incorrect function type for the parameter
of an extracted method. An issue is to be reported and fixed later upon demand
2015-05-26 15:04:56 +03:00
Alexey Sedunov b1f1360081 PSI: Make JetPostfixExpression.getBaseExpression() nullable
#KT-7761 Fixed
2015-05-21 19:29:49 +03:00