Ilya Kirillov
26e9e9de11
[LL FIR] add regression tests for KTIJ-23090
...
^KTIJ-23090 obsolete
2023-06-30 11:13:47 +00:00
Ilya Kirillov
048ecdf981
[Analysis API] add regression tests for KTIJ-24163
...
^KTIJ-24114 obsolete
2023-06-30 11:13:46 +00:00
Jinseong Jeon
f467c970b2
Drop param name check in PSI-KtSymbol eq checker
...
Parameter names might not be available, e.g., header jar (ijar).
2023-06-29 14:44:41 +00:00
Anna Kozlova
11c4fcda5f
[psi][AA] don't decompile code when stubs have enough information
...
^ KTIJ-25979
+ do not assert when there are no stubs (text is already computed)
2023-06-29 10:09:20 +00:00
aleksandrina-streltsova
4ccea40651
[AA] Provide API for obtaining array element type of KtType
...
KTIJ-23199
2023-06-29 09:41:40 +03:00
Jinseong Jeon
0d19a5b3ea
AA: make paths platform-independent before using JRT file system
...
^KT-59697 Fixed
2023-06-28 22:13:16 +02:00
Jinseong Jeon
a93bc60655
AA: use simple name of local type as JVM internal name
...
Otherwise, e.g., if a local type is within an anonymous object, full
class id will include that anonymous object too, resulting in invalid
type signature for PsiType.
^KT-59533 Fixed
2023-06-28 18:38:01 +02:00
Dmitrii Gridin
6553290b05
[LL FIR] FirElementFinder: drop obsolete debug info
...
Issue with CME already fixed in LL FIR some time ago
2023-06-28 10:34:04 +00:00
Dmitrii Gridin
2769632c77
[LL FIR] FirElementFinder: mark object internal
2023-06-28 10:34:04 +00:00
Dmitrii Gridin
eb4fe1a1c5
[LL FIR] FirElementFinder: fix file name
2023-06-28 10:34:04 +00:00
Dmitrii Gridin
94d727a9ce
[AA FIR] KtFirVisibilityChecker: drop redundant resolve
...
We can collect a designation path by psi declaration without resolution
^KT-59454 Fixed
2023-06-28 10:34:04 +00:00
Dmitrii Gridin
ca521a81f8
[LL FIR] optimize search for fir declaration by kt declaration
...
Introduce new API to traverse FirFile by known declaration path
instead of unoptimized findSourceByTraversingWholeTree
^KT-59454
2023-06-28 10:34:04 +00:00
Egor Kulikov
d17c7d4729
[FIR] Correctly mute destructuring declaration test for 1.0
...
Merge-request: KT-MR-10847
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2023-06-27 16:17:07 +00:00
Pavel Kirpichenkov
630c8e9df6
[AA, tests] Limit scopes of test libraries to their roots, add JDK_HOME
...
Without the fix, all libraries share the global scope for all project
libraries. JDK_HOME was used implicitly for things such as providing
Record support, but was not included as a test library/sdk.
KT-59637
2023-06-27 10:29:22 +00:00
Egor Kulikov
a7c1f53af8
[FIR] Correctly process invalid destructing declarations
...
^KTIJ-24730 fixed
Merge-request: KT-MR-10712
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2023-06-27 09:54:01 +00:00
Anna Kozlova
ce76db1636
[AA] introduce KtKeywordsRenderer to support nonmodifier keywords filter
2023-06-26 16:21:20 +00:00
Roman Golyshev
a436f11caf
[Analysis API] Add useful references to reference shortener APIs
2023-06-26 14:37:14 +02:00
Roman Golyshev
b4c9a2616e
KTIJ-25960 [Analysis API] Resolve static declarations in KDoc
...
^KTIJ-25960 Fixed
2023-06-26 12:27:26 +00:00
Jinseong Jeon
e0fc0d96e5
AA: handle PsiType conversion for recursive type parameter case
...
^KT-59598 Fixed
2023-06-23 16:31:47 +02:00
Jinseong Jeon
7f1424737e
LC: rework modality of enum class
...
It is abstract if it has abstract member.
It is final if it doesn't have enum entries that need subclass.
Otherwise, it is open (i.e., no modifier)
^KT-57567 Fixed
2023-06-23 16:19:06 +02:00
Anna Kozlova
93887e1d7a
[LL] store builtin session as cached value
...
to invalidate builtins on stdlib update.
It is required after making builtins use stubs of stdlib.
2023-06-23 12:23:30 +00:00
Anna Kozlova
137f8b7c70
[decompiler] ensure names starting with numbers are escaped
...
^ KTIJ-25985
2023-06-23 11:17:46 +00:00
Denis.Zharkov
60f09f6512
K2: Adjust renaming on import for current package with K1 rules
...
Namely, once a file in a package `foo` has import `foo.bar as baz`,
auto imported `bar` from the package name becomes inivisible in the file
^KT-54854 Fixed
2023-06-23 10:58:08 +00:00
Jinseong Jeon
5d7ac18778
SLC: drop the assertion that class context shouldn't be null
...
...because it can be null if an anonymous object is returned as a value
of reified inline function, which isn't materialized as LC element.
^KT-59537 Fixed
2023-06-23 10:33:58 +00:00
Marco Pennekamp
f318cd8a79
[SLC/ULC] KTIJ-25335 Add tests for fields with missing names
2023-06-23 09:26:58 +00:00
Marco Pennekamp
c00eb050ce
[SLC/ULC] KTIJ-25335 Avoid generating fields with special names
...
- Due to the fixes for KTIJ-23584, when calling the UAST conversion
`convertDeclarationOrElement` from `BaseKotlinConverter` (intellij
project) for an SLC/ULC property, `convertDeclaration` failed because
the declaration is "special". This caused `convertPsiElement` to be
tried instead, which also returned `null`, causing the "failed to
convert element" exception described in KTIJ-25335.
- In parallel to the solution for KTIJ-23584, which fixed the special
names issue for functions, this commit skips UAST field generation for
properties with special names.
^KTIJ-25335 fixed
^KTIJ-24121 fixed
2023-06-23 09:26:57 +00:00
Pavel Mikhailovskii
c3746652a4
KT-59293 [SLC] Fix generation of DefaultImpls classes
2023-06-23 08:01:52 +00:00
Kirill Rakhman
896f8853ae
[FIR LT] Fix crash in incomplete when condition without type
...
#KT-58908 Fixed
2023-06-23 07:56:03 +00:00
Ivan Kylchik
8f88f08573
[FIR] Use correct source for implicit this receiver
...
#KT-57489 Fixed
#KT-56139 Fixed
#KT-56755 Fixed
2023-06-23 07:23:39 +00:00
Pavel Mikhailovskii
9f763deea1
KT-59325 [SLC] Fix generation of fields from companion objects
2023-06-22 14:48:12 +00:00
Anna Kozlova
190d49a1e0
[light classes] optimize accessors retrieval
...
Avoid expensive calls to `navigationElement` for methods
that cannot be getters/setters and would be filtered later.
Repeat partly naming generation strategy.
Merge-request: KT-MR-10689
Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com >
2023-06-22 14:14:39 +00:00
Vladimir Dolzhenko
d0477a6a30
Provide equals/hashCode based on original PSI to avoid potential PCEs
...
#KT-59445
2023-06-22 14:14:18 +00:00
Anna Kozlova
abdc44c18a
[LL] support search for decompiled fir for type parameters
...
^ KTIJ-25976
2023-06-22 12:51:44 +00:00
aleksandrina-streltsova
3477d35168
[AA] Provide expected type for annotation entry argument
...
^KTIJ-19863
2023-06-22 12:33:51 +00:00
Mikhail Glukhikh
7884d9a61e
K2: reproduce KT-54917
2023-06-22 12:29:11 +00:00
Dmitrii Gridin
b22769919e
[LL FIR] LLFirProvider: do not return unrelated FirFile for synthetic declarations
...
We do not expect to get a FirFile that is not associated with our requested element
^KT-59505
2023-06-22 10:22:37 +00:00
Dmitrii Gridin
34a871e0b0
[LL FIR] LLFirProvider: move backing field check to helper function
...
^KT-59505
2023-06-22 10:22:37 +00:00
Dmitrii Gridin
f74d4494aa
[LL FIR] fix designation path for synthetic declarations
...
A designation path for synthetic declarations like fake override
or member delegate contained the wrong FirFile, because it
was provided by the original declaration that is wrong.
So we should pick up the file from our path, because it shouldn't be
synthetic
^KT-59505 Fixed
2023-06-22 10:22:37 +00:00
Jinseong Jeon
799aadfacf
AA: add an option to create Application env for production v.s. test mode
...
...and use production mode by default for AA standalone
^KT-59511 Fixed
2023-06-22 11:32:29 +02:00
Pavel Mikhailovskii
134b02c754
KT-59563 [SLC] Fix type erasure in $annotations methods of extension properties
2023-06-22 09:06:12 +00:00
Kirill Rakhman
6318da0f02
[FIR] Remove or replace whole expressions in FIR diagnostic messages
...
FIR expressions rendered by FirRenderer don't look very nice in error
messages anyway, and additionally, they can become arbitrarily large,
so we shouldn't use them in messages.
#KT-59449 Fixed
2023-06-22 08:02:07 +00:00
Dmitriy Novozhilov
6c7eb0167c
[FIR] Report errors about type arguments on resolved qualifiers
...
^KT-56186 Fixed
^KT-56187 Fixed
^KT-59553
2023-06-22 07:09:15 +00:00
Roman Golyshev
ac92c129bf
KT-59093 [Analysis API] Remove unnecessary resolveCall overloads from KtCallResolverMixIn
...
^KT-58161 Fixed
2023-06-21 20:40:22 +00:00
Roman Golyshev
50c93b0228
KT-59093 [Analysis API] Make all resolveCall overloads nullable
...
Instead of returning an error which does not mean anything specific,
it's easier just to return `null`
2023-06-21 20:40:22 +00:00
Roman Golyshev
c81b22e7de
KT-59093 [Analysis API] Remove error logging from KtFirCallResolver
...
There are too many possible error cases when code resolution cannot
properly resolve a call. Since in external mode `Logger.error` calls
lead to visible IDE errors, we want to avoid that
^KT-59093 Fixed
2023-06-21 20:40:21 +00:00
Bart van Helvert
807df9a120
[AA] Properly render type arguments in short name renderer
...
Render type arguments for short names without nested qualifier.
2023-06-21 18:51:57 +00:00
Roman Golyshev
26dbeb9b6f
KTIJ-25530 [Analysis API] Add missing test cases for Java statics
...
Can be done now because KT-58980 is fixed
2023-06-21 18:37:09 +00:00
Mikhail Glukhikh
78f4d399d4
FE: add test to ensure Java entries static field is resolved normally
2023-06-21 13:08:01 +00:00
Mikhail Glukhikh
905e1dcd3b
K2: introduce prioritized enum entries resolve by a 2.1 feature
...
Related to KT-48872
2023-06-21 13:08:01 +00:00
Mikhail Glukhikh
70899d492d
K2: reproduce KT-57954 and reorganize tests around enum entries warnings
...
In particular, here we add FIR_DUMP to all enum entries tests with
some deprecation diagnostics and the feature on, and remove all txt-files
2023-06-21 13:08:00 +00:00