Svyatoslav Kuzmich
1dc0b054ed
Deprecate PlatformDiagnosticSuppressors::shouldReportUnusedParameter with one parameter
2023-06-13 15:37:54 +00:00
Svyatoslav Kuzmich
dc4aa8c15e
[Wasm] Restore binary compatibility of PlatformDiagnosticSuppressor
...
Keep the original shouldReportUnusedParameter method without
BindingContext parameter
^KT-58188 Fixed
2023-06-13 15:37:53 +00:00
Nikita Bobko
de8c3826c2
[FE] Prohibit missed MUST_BE_INITIALIZED when there is no primary constructor
...
^KT-58472 Fixed
Review: https://jetbrains.team/p/kt/reviews/9967
2023-05-23 14:12:29 +03:00
Nikita Bobko
ac40010501
[FE] Prohibit open val deferred initialization
...
^KT-57553 Fixed
Review: https://jetbrains.team/p/kt/reviews/9967
Other related tests:
- testUninitializedOrReassignedVariables
- testUseOfPropertiesWithoutPrimary
- @TestMetadata("compiler/testData/diagnostics/tests/secondaryConstructors")
- testAugmentedAssignmentInInitializer
- testInitOpenSetter
- testInitOverrideInConstructorComplex
- testPropertyInitializationOrder
2023-05-23 14:12:28 +03:00
Nikita Bobko
38319c55a8
[FE] Replace some MUST_BE_INITIALIZED messages with MUST_BE_INITIALIZED_OR_BE_FINAL
...
From user point of view it's an improvement in compilation message.
From technical point of view it's an introduction of new compilation
diagnostic.
Review: https://jetbrains.team/p/kt/reviews/9967
I'm going to deprecate `open val` case in the next few commits KT-57553.
But it is always possible to suggest using `final` for `open val` case.
2023-05-23 14:12:28 +03:00
Nikita Bobko
9a65dcb664
MUST_BE_INITIALIZED: take into account containingDeclaration's modality
...
^KT-58587 Fixed
Review: https://jetbrains.team/p/kt/reviews/10136
This commit is important in scope of KT-57553. It makes the migration
more smooth.
Other related tests:
- testUninitializedOrReassignedVariables
- testAugmentedAssignmentInInitializer
2023-05-12 13:48:49 +00:00
Mikhail Zarechenskiy
fc37885d6d
K1: report a warning for invisible setter accessed from a derived class
...
The issue is that during binding fake overrides, the compiler doesn't
differ setters from its properties, so the compiler uses the same
visibility for setter and entire property.
Changing logic at the binding stage can cause some unpredictable consequences so
the fix is to do this differentiation right at the reporting stage
^KT-56662 Fixed
Merge-request: KT-MR-9565
Merged-by: Michail Zarečenskij <Mikhail.Zarechenskiy@jetbrains.com >
2023-04-17 11:08:16 +00:00
Anna Kozlova
3496f69f33
[cfg] don't traverse annotation arguments for decompiled code
...
^ KT-57768
decompiled code have no annotation arguments expressions,
but search for them causes decompiling of code
which is slow and unneeded
2023-04-04 10:55:22 +00:00
Mikhail Zarechenskiy
681e85eaed
Don't report unused variable warning for delegated variables with provide delegate
...
^KT-38871 Fixed
2023-03-27 13:46:13 +00:00
Svyatoslav Kuzmich
60ef7fcb49
[Wasm] Suppress unused parameters warning for functions with JS body
...
These parameters can be used in js(code)
2023-03-03 19:39:09 +00:00
Vladimir Dolzhenko
4542b3947b
Clean up: rename Jet* to Kt*
2023-01-03 16:36:53 +01:00
Pavel Mikhailovskii
1215ae0fe7
KT-1436 Nicer compiler errors when the feature isn't supported
2022-10-31 13:49:57 +00:00
Dmitriy Novozhilov
d423782fac
[FE 1.0] Remove usages of safeAs and cast from most of FE 1.0 modules:
...
- :core:descriptors
- :core:descriptors.jvm
- :core:deserialization
- :compiler:cli
- :compiler:frontend
- :compiler:frontend:cfg
- :compiler:frontend.java
- :compiler:frontend.common.jvm
- :compiler:psi
- :compiler:resolution
- :compiler:resolution.common
- :compiler:resolution.common.jvm
- :kotlin-reflect-api
2022-10-12 13:58:56 +00:00
Pavel Mikhailovskii
8ba80b4b7b
KT-1436 Allow break/continue in inlined lambdas
2022-08-11 10:38:23 +00:00
Victor Petukhov
5f5c3aa534
[FE 1.0] Clean-up pseudocodeUtils.kt: remove unused methods, move test specific methods into test-common module
2022-07-22 16:03:50 +00:00
Kristoffer Andersen
8d79fab109
Change BACKING_FIELD_REQUIRED from SetSlice
2022-07-18 23:50:35 +02:00
Dmitriy Novozhilov
509ed69d28
[K1] Get rid of CONSERVATIVE_SET_INCLUSION_SEMANTICS rewrite policy
...
This policy didn't work in IDE, because trace in IDE always allow rewrites
to slices
^KT-53072 Fixed
2022-07-05 17:44:25 +00:00
Dmitriy Novozhilov
89b1307e16
[FE 1.0] Don't report UNUSED_* warnings on local properties with delegate
...
^KT-25527 Fixed
2022-05-19 07:14:23 +00:00
Mads Ager
17b5e46547
[FE1.0] Fix CFG for inline function calls in finally blocks.
...
The body of the InlinedLocalFunctionDeclarationInstruction was
not copied. That confuses the information on the exceptional edge
with the information on the normal edge.
^KT-52131 Fixed
2022-04-28 14:39:59 +03:00
Aleksei.Cherepanov
3d8f140d6b
[JPS] Fix incremental build after changing Java enum used in Kotlin when
...
EnumWhenTracker implemented for tracking changed java enum class items, that used in kotlin when expression.
#KT-47824 Fixed
2022-04-19 18:39:41 +00:00
Dmitriy Novozhilov
565c61a702
[FE 1.0] Fix false-negative INVALID_IF_AS_EXPRESSION_WARNING and NO_ELSE_IN_WHEN_WARNING
...
^KT-51711 Fixed
2022-03-28 12:37:24 +00:00
Dmitriy Novozhilov
bb6c6dc45d
[FE 1.0] Fix reporting of UNINITIALIZED_ENUM_ENTRY on qualified enums
...
^KT-41124
^KT-50758 Fixed
2022-01-14 14:26:54 +03:00
Dmitriy Novozhilov
50f6825775
[FE 1.0] Cleanup code of ControlFlowProcessor
...
- Always pass not nullable language version settings
- Fix warnings and style
- Remove redundant pseudocode utils
2022-01-14 14:26:53 +03:00
Mikhail Glukhikh
61e0375900
Drop YIELD_IS_RESERVED diagnostic in 1.7.0 #KT-27750 Fixed
2021-12-23 17:45:50 +03:00
Dmitriy Novozhilov
8a58e98530
[FE 1.0] Support proper DUPLICATE_LABEL_IN_WHEN reporting for deprecated complex boolean expressions
...
^KT-50385
^KT-39883
2021-12-21 16:36:20 +03:00
Vyacheslav Gerasimov
f7a9065b75
Build: Use intellij maven repo instead of downloaded IDEA
...
#KTI-82
2021-12-16 21:48:23 +03:00
Dmitriy Novozhilov
df2e9e3797
[FE 1.0] Correctly set USED_AS_EXPRESSION for unreachable when and if blocks
...
^KT-50028 Fixed
2021-12-06 17:24:06 +03:00
Dmitriy Novozhilov
93378b1a04
[FE 1.0] Resolve private constructors of sealed classes same as for regular classes
...
^KT-44866
^KT-49729
2021-11-18 13:54:05 +03:00
Dmitriy Novozhilov
58889a2b5c
[FE 1.0] Prohibit access to members of companion of enum from enum entry initializer
...
^KT-49461 Fixed
^KT-49110
2021-10-29 18:45:19 +03:00
Ivan Kochurkin
c13822a2c5
Optimize containsKey -> get pattern
2021-10-25 21:21:44 +03:00
Dmitriy Novozhilov
a2b8493f47
[FE 1.0] Prohibit using non exhaustive if and when in rhs of elvis expression
...
^KT-44705
^KT-49349 Fixed
2021-10-21 19:39:51 +03:00
Victor Petukhov
a264cbfe7d
Move CallUtil.kt under the resolve.util package
2021-09-27 16:12:01 +03:00
Victor Petukhov
3e1b416a54
Move resolvedCallUtil.kt under the resolve.util package
2021-09-27 16:11:59 +03:00
Victor Petukhov
6082d681b6
Rename the old inference ResolutionCandidate to OldResolutionCandidate
2021-09-27 16:11:58 +03:00
Vyacheslav Gerasimov
ab146bd6d4
Build: Fix deprecated Gradle configurations usages
...
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Dmitriy Novozhilov
bfeb9c219d
[FE 1.0] Correctly set USED_AS_EXPRESSION for unreachable catch clauses
...
^KT-48806 Fixed
2021-09-17 18:38:19 +03:00
Dmitriy Novozhilov
d390f881c8
[FE 1.0] Record USED_AS_EXPRESSION for unreachable CFG nodes
...
^KT-48708 Fixed
2021-09-13 16:22:50 +03:00
Dmitriy Novozhilov
7a7672b0de
[FE 1.0] Fix reporting of non exhaustive when statement for whens with subject
...
^KT-48653 Fixed
2021-09-12 16:04:18 +03:00
Denis.Zharkov
cdd8d1c163
Add AND (&) token
2021-08-31 15:41:09 +03:00
Dmitriy Novozhilov
d17f984edf
[FE 1.0] Migrate most of warning/error pairs to DiagnosticFactoryForDeprecation
2021-08-03 00:17:33 +03:00
Dmitriy Novozhilov
a710a8d10f
[FE 1.0] Report warning on non-exhaustive when statements only after 1.6
...
^KT-47709
2021-07-21 17:53:05 +03:00
Dmitriy Novozhilov
f3116cb64a
Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code
2021-07-20 13:33:46 +03:00
Dmitriy Novozhilov
ef635f6a96
[FE 1.0] Report NON_EXHAUSTIVE_WHEN_STATEMENT/NO_ELSE_IN_WHEN for when's on logical types
...
^KT-47709 In Progress
2021-07-20 13:33:43 +03:00
Dmitriy Novozhilov
ae608ea67f
[FE 1.0] Always create return value for CallInstruction
...
This fixes missing `USED_AS_EXPRESSION` recordings
^KT-47527 Fixed
2021-07-02 17:55:20 +03:00
pyos
1f9db7cf25
FE: properly clear the deferred generator stack
...
Before this commit the stack wasn't cleared for read variable case.
#KT-47168 Fixed
2021-06-11 15:56:20 +03:00
Dmitriy Novozhilov
cef859fced
Fix exponential pseudocode size on incorrect prefix increments and decrements
...
#KT-44153 Fixed
2021-03-16 12:25:23 +03:00
Ilya Chernikov
7c63105bb7
Mark script result expression as used to avoid coercion to unit
2021-03-11 15:50:32 +01:00
Ilya Chernikov
22f1814911
Fix CFA for destructuring declarations in scripts
...
in particular without the fix, the CFA skipped marking of the used
result values in lambdas and they were coerced to unit in IR
2021-03-11 15:50:31 +01:00
Dmitriy Novozhilov
4222bb9af2
[FE] Make whens on expect sealed classes and enums not exhaustive
2021-02-25 14:56:08 +03:00
Alexander Udalov
2e2caae05c
Extract control flow analysis to separate module
...
Extract a service interface out of ControlFlowInformationProviderImpl
and register its implementation in two "leaf" modules: 'cli',
'idea-core'.
This improves parallel build, since a lot of modules depend on
'frontend' but only these two modules reference the implementation and
thus depend on the full CFA implementation now.
2021-02-24 17:17:04 +01:00