Commit Graph

158 Commits

Author SHA1 Message Date
aleksandrina-streltsova 1c472c2751 [AA] update test data after adding properties to callable symbols
KT-54846
2023-07-24 17:24:42 +00:00
aleksandrina-streltsova fe4ca30c55 [AA] implement isExpect/isActual for callable symbols
^KT-54846 Fixed
2023-07-24 17:24:42 +00:00
aleksandrina-streltsova 52a95cb75f [AA] update test data after adding properties to KtClassLikeSymbol
KT-54846
2023-07-24 17:24:41 +00:00
aleksandrina-streltsova ca25162574 [AA] implement isExpect/isActual for KtClassLikeSymbol
KT-54846
2023-07-24 17:24:41 +00:00
Alexander Udalov 40c628d431 FIR: fix order of property accessor annotations
#KT-57219 Fixed
2023-05-22 20:12:29 +00:00
Dmitrii Gridin 9a267176f5 [FIR] move deprecation calculation to COMPILER_REQUIRED_ANNOTATIONS phase
Also, this change adds SinceKotlin and Java.Deprecated to this phase
It fixes some problems with API_NOT_AVAILABLE, so now it is closer to K1

^KT-57648 Fixed
^KT-55723 Fixed
2023-05-11 10:31:52 +00:00
Dmitriy Novozhilov af60681705 [FIR] Save declarations in metadata in source order
^KT-54792 Fixed
^KT-54801
^KT-54800
2023-05-09 07:36:32 +00:00
Mikhail Glukhikh 180613e1c6 K2: calculate deprecations for backing field properly
#KT-58224 Fixed
2023-05-01 11:59:20 +00:00
Anna Kozlova d59d66e876 [AA, LL] use stubs to build deserialized Fir elements in IDE
^KTIJ-24638

Notice on `DebugSymbolRenderer`:
stub based deserializer sets source directly,
but it's available in IDE mode only.
Thus, standalone and IDE tests have different results.
In order to avoid this, sources for compiled code are explicitly ignored

Notice on distinct callables:
for a file which belong to multiple libraries, decompiled code would be build per library.
In order to avoid ambiguity errors for members in that file,
we need to distinct provided elements by origins
failed test from IJ repo:
 FirReferenceResolveWithCrossLibTestGenerated#testSetWithTypeParameters
2023-04-27 11:37:28 +00:00
Mikhail Glukhikh 156be26982 AA: use full rendering of backing field symbols 2023-04-25 12:18:27 +00:00
Mikhail Glukhikh 1f05ce2e01 AA/LC: Support annotation property->backing field move
#KT-57462 Fixed
2023-04-25 12:18:27 +00:00
Dmitrii Gridin 6b3e49e824 [AA FIR] correctly restore declaration with annotation with argument inside some type from symbol pointer
ConeAttributes can have some non-stable info, so we shouldn't render it

Also reduce resolve from IMPLICIT_TYPES_BODY_RESOLVE to TYPES where it is possible

^KT-58141 Fixed
2023-04-21 17:21:36 +00:00
aleksandrina-streltsova 1a10e0fdb6 [Analysis API] Render annotations of type parameters 2023-03-03 06:43:08 +00:00
Ilya Kirillov 803c3b88ac [Analysis API] fix exception on symbol restore when symbol cannot be seen from the use-site module
^KT-56763 fixed
2023-02-20 11:01:32 +00:00
Dmitriy Novozhilov 8e3022452e [FIR] Unify diagnostic message in FIR dump for syntax error between PSI and LT 2023-02-14 17:08:55 +00:00
Ting-Yuan Huang 42b08d411b [FIR] Pass container when creating FunctionType
so that it can be resolved when type annotations are demanded.
2023-02-08 19:43:24 +00:00
Dmitrii Gridin 72d8fa216a [AA] DebugSymbolRenderer: move annotations and type arguments renderer befor type to avoid resolve race
^KT-56046
2023-02-03 19:48:56 +00:00
Dmitrii Gridin d13ad454da [AA FIR] fix nested type annotations lazy resolve
^KT-56046
2023-02-03 19:48:56 +00:00
Dmitrii Gridin 3b99a5bf34 [AA] DebugSymbolRenderer: improve context receivers render
^KT-56046
2023-02-03 19:48:55 +00:00
Dmitrii Gridin 1e2d517c21 [AA] DebugSymbolRenderer: improve type render
to process all nested annotations and types

^KT-56046
2023-02-03 19:48:55 +00:00
Justin Paupore eccbc66581 [AA] Add implementation for annotationApplicableTargets.
Adds implementation and tests for the new
KtClassOrObjectSymbol.annotationApplicableTargets property on
KtSymbolInfoProvider. This implementation delegates to the canonical
implementation in AnnotationChecker for FE1.0, and to the implementation
in FirAnnotationHelpers for FIR.

This change also includes direct tests for annotationApplicableTargets,
and a fix for FirClassLikeSymbol.getAllowedAnnotationTargets in
FirAnnotationHelpers.
2023-01-24 14:39:55 +01:00
Justin Paupore 3e80433356 [AA] Add stub annotationApplicableTargets extension.
Introduce an extension method to retrieve the set of applicable targets
for an annotation, given the annotation class's symbol.

This extension on `KtSymbolInfoProvider` causes a large amount of churn
in test data files, so this change starts off by introducing the
property and always making it return null. A future change will
introduce the actual behavior change, and will include the testdata
changes for the few tests that actually return useful data for this
property.
2023-01-24 14:39:54 +01:00
Dmitrii Gridin a49b72b05e [AA] update testData
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:05 +00:00
Dmitrii Gridin 7f24a38997 [FIR] FirTypeResolveTransformer: support lazy type annotations for all declarations
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:04 +00:00
Dmitrii Gridin 73cdaf5c3c [FIR] CustomAnnotationTypeAttribute: support type aliases
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:03 +00:00
Dmitrii Gridin 09a77d261d [AA] KtTypeInfoProvider: introduce fullyExpandedType extension
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:03 +00:00
Anna Kozlova 6f9cfe1943 [AA] don't treat broken code as function type parameter
inspired by KTIJ-23940
2023-01-17 11:50:20 +00:00
aleksandrina-streltsova 3a6e3290aa [FIR] KTIJ-24156: Add test data 2023-01-10 20:15:28 +00:00
Dmitrii Gridin 8bbe60e96c [AA] add more tests on companion members 2022-12-20 19:52:13 +00:00
Dmitrii Gridin 643b74fa28 [AA FIR] support symbol pointers for static properties
^KT-55487
2022-12-20 19:52:12 +00:00
Dmitrii Gridin e476150025 [AA FIR] support symbol restoring for static members
^KT-55487 Fixed
2022-12-20 19:52:10 +00:00
Steven Schäfer 6af616d3c3 FIR: make declarations marked with 'override' implicitly open
#KT-52236 Fixed
2022-12-14 21:46:41 +00:00
Ilya Kirillov 68a17242b3 [FIR] fix NPE on missing java annotations qualifier
^KTIJ-23075 fixed
2022-12-14 09:58:07 +00:00
Marco Pennekamp 2cd16f055a [AA] KT-55098 Render context receivers in declarations & function types
- `context(...)` is a modifier that must precede annotations and other
  modifiers, so for declarations it is rendered in
  `renderAnnotationsAndModifiers`.
- Ignore `@ContextFunctionTypeParams` in the annotation list of FE10
  types, as the annotation is an implementation detail of context
  receivers in K1 and shouldn't be rendered.

^KT-55098 fixed
2022-12-06 17:43:30 +00:00
Ilya Kirillov 5477e2073f [Analysis API] fix typo in testdata filenames 2022-12-05 17:27:43 +01:00
Nikita Bobko 5be153cd65 2/2 analysis-api: Initial implementation for contracts
Review: https://jetbrains.team/p/kt/reviews/7652

Put this change into a separate commit because:
1. The change is boring and clutters the diff of the first commit
2. The first commits is already too big
2022-12-01 14:42:49 +01:00
Nikita Bobko b2397f033b 1/2 analysis-api: Initial implementation for contracts
Review: https://jetbrains.team/p/kt/reviews/7652

I need this API for KTIJ-22692
2022-12-01 14:42:49 +01:00
Dmitrii Gridin cb8cc65fb8 [AA Fe10] update testData
org.jetbrains.kotlin.analysis.api.fe10.test.cases.generated.cases.symbols.Fe10IdeNormalAnalysisSourceModuleSymbolByFqNameTestGenerated.testKclass
2022-11-25 15:33:58 +01:00
Dmitrii Gridin e684607e9d [AA] FirCallableSignature: add test on type alias
^KT-54826
2022-11-24 18:32:45 +00:00
Dmitrii Gridin dfc59d5d07 [AA FIR] support symbol pointer restore for value parameter from delegated setter
^KT-54051
2022-11-24 18:32:44 +00:00
Dmitrii Gridin 55ca2d608b [AA] AbstractSymbolTest: add check for parameters
^KT-54826
2022-11-24 18:32:44 +00:00
Dmitrii Gridin 1222d18b3d [AA Fe10] fix StackOverflowError from KtFe10PsiClassInitializerSymbol
^KT-54826
2022-11-24 18:32:44 +00:00
Dmitrii Gridin 2155a23e4e [AA FIR] implement FirCallableSignature to simplify search by signature
^KT-54826 Fixed
2022-11-24 18:32:43 +00:00
Dmitrii Gridin 48e2e5cc87 [AA] AbstractSymbolTest: add type parameters check
^KT-54826
2022-11-24 18:32:43 +00:00
Anna Kozlova 43bd05f470 [LL FIR] make dependency from library on builtins invisible from outside
^KTIJ-23421

hide explicit builtins to reveal target platform dependencies.
Otherwise, `expect` class from builtin of e.g. JDK
would be found instead of actual dependency from Kotlin Runtime
2022-11-23 10:46:49 +00:00
Ilya Kirillov f775778efa [Analysis API FIR] fix containing declaration for value parameter
now it should also work for non-source declarations
2022-11-22 18:25:30 +01:00
Anna Kozlova 1906a41d9a fix testdata after merge 2022-11-22 13:31:41 +01:00
Anna Kozlova 702d0b4d54 [compiler] missed type parameters in local properties (KTIJ-23583)
even though local variables won't contain type parameters,
let's build fir for them
2022-11-22 10:47:45 +00:00
Nikolay Lunyak fb09f139dd [FIR] Unmute receiver annotations tests
These tests were muted in 89f8821d. Seems they began to work after the
introduction of `FirReceiverParameter` in KT-54417.
2022-11-21 08:51:43 +00:00
Dmitrii Gridin a0f4c674f5 [AA] KtCallableReceiverRenderer: add annotations renderer
^KT-54417
2022-11-17 09:50:19 +00:00