Dmitriy Novozhilov
31776d9a3b
[CFA] Mark arguments of all annotation calls as USED_AS_EXPRESSION
...
Also revert hacky fix of KT-37294 introduced in 80caa063b
#KT-37447 Fixed
2020-03-13 14:32:28 +03:00
Ilya Chernikov
6356807997
Reapply "Only create descriptors for candidates with lambda args"
...
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00
Mikhail Zarechenskiy
ca57d6cd16
[NI-MIGRATE] Update pseudocode tests for NI
2020-02-13 11:15:58 +03:00
Dmitry Savvinov
5cb949ad7f
Fix language features in tests for gradual migration to 1.3 (part 2)
...
In 1.3, due to changes in language, testdata for some tests can be
different from 1.2
We want to simlultaneously test both versions, so instead of fixing
language version in such tests, we split them into two: one with fixed
1.2, another with fixed 1.3
2018-07-05 10:42:49 +03:00
Mikhail Glukhikh
8e23ca597d
Add extra tests for KT-20429, simplify code a bit
2017-12-28 20:31:44 +03:00
Alexander Udalov
6e410cb182
Make TypeConstructor.isFinal return false for enums
...
The reason is that before dc02b2e3ab and 8a0dcca957 ,
TypeConstructor.isFinal for some class descriptors
(DeserializedClassDescriptor, LazyJavaClassDescriptor,
MutableClassDescriptor) were implemented as `isFinalClass` (which is
`modality == FINAL && kind != ENUM_CLASS`), and all others as
`modality == FINAL` or simply true/false. This led to differences in
behavior depending on the exact instance of the class descriptor.
Now that TypeConstructor.isFinal is always `modality == FINAL`, some
tests (PseudoValueTestGenerated) fail because the finality of some type
constructors changed and these tests render final vs non-final type
constructors differently.
In this commit, TypeConstructor.isFinal is now made to behave safer,
i.e. considering enum class type constructor to be non-final (as was the
case earlier for some ClassDescriptor instances). Some diagnostics might
disappear (e.g. FINAL_UPPER_BOUND) but it doesn't look like a big deal
2017-10-18 12:45:45 +02:00
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