Marco Pennekamp
ea346e3e0e
[AA] Rename originalOverriddenSymbol to unwrapFakeOverrides
...
- `unwrap` signals that fake overrides will be unwrapped until the
original symbol is recovered.
- Also remove nullability of the returned `KtCallableSymbol`. If the
given symbol cannot be unwrapped, it is most likely already the
original symbol.
- Remove the lazy resolve to `STATUS` in `KtFirOverrideInfoProvider`, as
it's not needed to unwrap fake overrides.
2022-11-30 19:49:14 +00:00
Dmitrii Gridin
e27ffada26
[AA] KtSymbol: add context receiver to 'createPointer'
...
^KT-54051
2022-11-29 13:33:46 +00:00
Dmitrii Gridin
37729c0353
[SLC] migrate SymbolLightParameterForReceiver to KtReceiverParameterSymbol
...
^KT-54051
2022-11-29 13:33:43 +00:00
Dmitrii Gridin
db23cbe29e
[AA] introduce api to create symbol pointer from psi
...
^KT-54051
2022-11-29 13:33:32 +00:00
Anna Kozlova
abb45a0728
[AA] don't treat incomplete function as anonymous
...
^KTIJ-23672
sync anonymous function predicate with RawFirBuilder/DeclarationsConverter
2022-11-25 14:27:03 +00: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
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
edd60cd204
[AA] improve symbol pointers for property accessors
...
Fe10:
* supported default setter
* support default getter
* support parameter from default setter
Fir:
* support java synthetic properties
* support parameter from default setter
^KT-54051
2022-11-24 18:32:41 +00:00
Anna Kozlova
cdf6ffa167
[AA] do not try to build KtSymbol for FirErrorFunction
...
^KTIJ-23669
FirErrorFunctions are created for unknown labels
when the code in return statements is not complete yet.
Such labels cannot be resolved, and no symbols should be created for them
2022-11-24 13:09:29 +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
Marco Pennekamp
93f560eb4d
[Analysis API] Add call resolution tests for KTIJ-23373
...
- The Java functions aren't recognized as candidates during the test
(`FULL_JDK` isn't helping), so I've replicated the tests with local
extension functions and confirmed that they uncover the same
exception.
2022-11-22 13:13:35 +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
Jaebaek Seo
c55efe62a3
[AA] handles FIR isUsedAsExpression for return within function block
...
For the following example:
```
fun foo(bar: Int) {
<expr>if (bar == 4) return "Four"
else return "Int"</expr>
}
```
AA FE1.0 `isUsedAsExpression` returns `false`.
Since the current AA FIR `isUsedAsExpression` returns `true` for the
above example, this commit fixes it.
2022-11-21 18:26:41 +01:00
Anna Kozlova
e5ce32feeb
[ANALYSIS API] introduce dedicated KtCall for incomplete code
...
KTIJ-23505 and duplicates
2022-11-18 20:59:31 +01:00
Marco Pennekamp
c5e5140c08
[Analysis API] Fix exceptions around type parameters being treated as callables
...
- `toResolvedCallableSymbol`: cast defensively because
the resolved symbol might not be a callable symbol.
- `toKtCallInfo`: Check that the resolved symbol is actually callable.
^KTIJ-23003 fixed
2022-11-17 18:58:38 +00:00
Jinseong Jeon
6caf384bad
AA FIR: handle Java annotation vararg values
2022-11-17 12:58:14 +01:00
Dmitrii Gridin
1ebfbc0ee9
[AA] KtCallableSymbol: rename receiver to receiverParameter
...
^KT-54417
2022-11-17 09:50:12 +00:00
Dmitrii Gridin
2741052db3
[AA] integrate KtReceiverParameterSymbol to KtCallableSymbol
...
^KT-54417
2022-11-17 09:50:10 +00:00
Dmitrii Gridin
b333a214ca
[AA K1] KtFe10PsiAnonymousFunctionSymbol: fix receiver
...
^KT-54417
2022-11-17 09:50:10 +00:00
Jinseong Jeon
fcba1f215a
AA: handle erroneous type in nested type argument
2022-11-16 14:13:43 +01:00
Jaebaek Seo
f8a101cf3a
Add KtType.isArrayOrPrimitiveArray/isNestedArray() to AA
2022-11-15 16:50:17 +01:00
Anna Kozlova
9f470e2a4d
[LL API] return FirErrorProperty for top level destructuring declaration
...
KTIJ-23552
2022-11-11 17:39:54 +01:00
Anna Kozlova
3590c4ea35
[Analysis API FIR] support generated temp properties
...
KTIJ-23492 (array index expression), KTIJ-23138 (inc/dec desugaring)
2022-11-11 17:39:53 +01:00
Dmitrii Gridin
fe93f49ff7
[AA] KtPsiBasedSymbolPointer: add class type check
...
^KT-54311
2022-11-11 14:34:51 +00:00
Yan Zhulanow
4d41ac09df
[Analysis API] Treat inapplicable declarations safely (KTIJ-23458)
...
Make 'getClassOrObjectSymbol()' and 'getNamedClassOrObjectSymbol()'
return 'null' for inapplicable PSI declarations.
2022-11-11 11:28:38 +00:00
Ilya Kirillov
2378437b30
[Analysis API FIR] do not create resolved KtTypes for unresolved ones
2022-11-11 12:00:00 +01:00
Ilya Kirillov
7545ccad81
[Analysis API FE1.0] do not expose ExtensionFunctionType from functional types
...
it's a frontend implementation detail
2022-11-11 12:00:00 +01:00
Ilya Kirillov
b47675916f
[Analysis API] remove old renderer code
2022-11-11 12:00:00 +01:00
Ilya Kirillov
d1eb7c51f1
[Analysis API] rework renderer
...
^KTIJ-23268 fixed
2022-11-11 11:59:58 +01:00
Ilya Kirillov
f8ed993307
[Analysis API FE1.0] fix functional types for KFunction
...
previously, they were throwing an exception
2022-11-11 11:59:58 +01:00
Ilya Kirillov
57ee78a7f5
[Analysis API FE1.0] fix constructor symbol parameters
...
They should not come from the class itself
2022-11-11 11:59:57 +01:00
Ilya Kirillov
3fb5ce3bdd
[Analysis API FE1.0] fix equals/hashCode for symbols
2022-11-11 11:59:57 +01:00
Ilya Kirillov
2ca89e4983
[Analysis API FE1.0] fix constructors in scopes
2022-11-11 11:59:57 +01:00
Ilya Kirillov
e706c49eb0
[Analysis API FE1.0] remove Any? type parameter bound
2022-11-11 11:59:56 +01:00
Ilya Kirillov
725ae1fc65
[Analysis API] separate non-class error types from class error types and add information about type qualifiers
...
it's needed for type printing in renderer
2022-11-11 11:59:55 +01:00
Jinseong Jeon
2131cb4fe0
AA FIR: functional type for anonymous function
...
^KTIJ-17657 In progress
2022-11-11 10:15:44 +01:00
Dmitrii Gridin
202a022b49
[AA K2] implement symbol pointers for value parameters
...
^KT-54311
2022-11-10 06:39:23 +00:00
Dmitrii Gridin
42f8e6fbe6
[AA] add more tests on java field symbols
...
^KT-54311
2022-11-10 06:39:20 +00:00
Dmitrii Gridin
c6a3ca86eb
[AA K2] symbol pointers: add tests on enum entry
...
^KT-54311
2022-11-10 06:39:19 +00:00
Dmitrii Gridin
47c9618b79
[AA K2] implement symbol pointers for type aliases
...
^KT-54311
2022-11-10 06:39:17 +00:00
Dmitrii Gridin
4bd604f2ed
[AA] check symbol pointer restoring without psi anchor
...
^KT-54311
2022-11-10 06:39:14 +00:00
Jinseong Jeon
b2e239a542
AA: tests about equals on sealed/data class
...
^KT-54844 In Progress
2022-11-09 07:12:36 +01:00
Anna Kozlova
79bed083e6
[FIR] allow primary constructors in interfaces to support invalid code
...
KTIJ-23504
2022-11-08 14:51:33 +01:00
Jinseong Jeon
4497be0b68
AA: do not parse signature with NO_NAME_PROVIDED
...
^KTIJ-23503 Fixed
2022-11-04 10:42:19 +01:00
Anna Kozlova
f18d1e9067
[Analysis API FIR] support call expression resolve in class literal
...
KTIJ-23272
2022-11-04 08:10:09 +01:00
Jinseong Jeon
542ca68aba
AA: add test about PsiType for @JvmInline value class
2022-11-02 18:04:38 +01:00
Jinseong Jeon
c9a2e10dd7
AA: merge single/multi modules tests for PsiTypeProvider
...
...because single-module test is also multi-module test
2022-11-02 17:38:16 +01:00
Jinseong Jeon
d98081dce2
AA: introduce MPP tests for PsiTypeProvider
2022-11-02 17:38:16 +01:00