Commit Graph

309 Commits

Author SHA1 Message Date
Roman Golyshev bb2bee74cf [HL API] Fix FE10 implementation of KtExpressionTypeProvider 2022-09-01 13:57:03 +00:00
Ilya Gorbunov 6aff3c6d07 Update misc test data after introducing rangeUntil member #KT-52933 2022-08-24 22:22:54 +00:00
Nikita Bobko 2a4f3f41aa 2/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00
Nikita Bobko 0874fb71c6 Replace all kotlin-reflect-api dependencies with kotlin-reflect
Review: https://jetbrains.team/p/kt/reviews/6753

Why: I'm going to replace source dependency on kotlin-reflect with
binary dependency. Normalize reflect dependency before global
processing.
2022-08-22 15:43:11 +02:00
Nikita Bobko 70ed76e0bd Drop unused ':dist' dependency in some tests
Review: https://jetbrains.team/p/kt/reviews/6753

This commit doesn't fix any issue except for "cleanup". If you find a
mistake in this commit feel free to revert part of it/the whole commit

I checked every module where I drop ':dist' dependency. Tests still pass
in those modules
2022-08-22 15:42:34 +02:00
Jinseong Jeon 79686ba242 AA FE1.0: don't return psi for fake overrides 2022-08-20 00:50:10 +02:00
Jinseong Jeon 25f7554a31 AA FIR: constant evaluation for Java field 2022-08-20 00:50:09 +02:00
Jinseong Jeon 2a864b3685 AA: add tests for PsiDeclarationAndKtSymbolEqualityChecker 2022-08-17 19:16:17 +02:00
Jinseong Jeon 846ab7d97b AA: revamp standalone-mode tests 2022-08-17 19:16:17 +02:00
Simon Ogorodnik 513af2dfbc FIR. Refactor smart-cast representation in FIR tree
Make smart-casts non-transparent expression without delegation
to underlying FirQualifiedAccessExpression, as children delegation in
fir tree has unclear semantics
Remove two different kinds of tree nodes for smart-casts
2022-08-15 21:46:11 +00:00
Dmitry Gridin c9e9ee90a3 [analysis] remove redundant OptIn annotations 2022-08-15 11:04:59 +02:00
Dmitry Gridin 8dbdea39da [analysis] remove redundant diagnostic suppression 2022-08-15 11:04:58 +02:00
Ilya Kirillov f45f1ba3dc [Analysis API] do not create multiple attachments inside exceptions 2022-08-10 22:49:14 +02:00
Ilya Kirillov f39f1da70d [Analysis API FE10] fix suspend function type mapping 2022-08-10 22:49:12 +02:00
Ilya Kirillov 4d5f1dc1bb [FIR] do not fail when Continuation classes not found in classpath 2022-08-10 22:49:12 +02:00
Ilya Kirillov ebc68dc54c [Analysis API] actualize testdata 2022-08-10 20:37:15 +02:00
Jaebaek Seo 50c293f83f Fix array access expression getKtType() bug
For an array access expression e.g., `foo[3]`,
KtFirExpressionTypeProvider first tries
`getReturnTypeForArrayStyleAssignmentTarget(..)` method that determines
the type of the array access expression when it is in the form of "set"
the value. However, the method also returns a non-null result for an
array access expression that reads its value i.e., "get". In this case,
the result of `getKtType()` becomes wrong. This commit lets the method
return a null for the type of "get" array access expression.
2022-08-10 17:34:49 +02:00
Jinseong Jeon 56a5d883c0 AA FIR: handle (aliased)? annotation w/ vararg parameter 2022-08-10 17:34:48 +02:00
Roman Golyshev bcd6a54ffb [Analysis API FIR] Fix small mistake in KDocReferenceResolver
`owner` is a PSI element, it can never be an instance of
`KtConstructorSymbol`

Also, make `MutableCollection` an extension receiver instead of context
receiver for the consistency
2022-07-29 17:13:52 +02:00
Ilya Kirillov 556add72ff [Analysis API FIR] fix KDoc reference resolve for aliased imports 2022-07-28 01:37:54 +02:00
Ilya Kirillov d9c4fda521 [Analysis API FIR] implement reference resolve inside KDoc
^KTIJ-22324 fixed
2022-07-28 01:37:53 +02:00
Ilya Kirillov 76f1744868 [Analysis API FIR] add more info to some exceptions 2022-07-23 19:54:47 +02:00
Ilya Kirillov 18b6a8b6a1 [Analysis API] make KtFunctionLikeSymbol to be sealed class 2022-07-22 00:59:00 +02:00
Ilya Kirillov b55f36f0fd [Analysis API] introduce some basic API to create KtSymbol by Java PSI
^KT-50240
2022-07-22 00:58:59 +02:00
Ilya Kirillov a0f0fa5a47 [Analysis API FIR] fix candidate collection for delegatedConstructor call
^KTIJ-20446
2022-07-22 00:58:59 +02:00
Ilya Kirillov dd00062559 [analysis] introduce KtBuiltinsModule and remove hacks related to the stdlib module search 2022-07-19 17:17:33 +02:00
Mikhail Glukhikh 76d5d3a2ec Extract separate FirModifierRenderer 2022-07-14 09:38:39 +00:00
Bart van Helvert 21f65b2fe3 KTIJ-22157 Make KtCallError attachment name static 2022-07-07 16:36:04 +00:00
Bart van Helvert 0c50072436 KTIJ-22157 Don't leak user code in unresolved call exception 2022-07-07 16:36:03 +00:00
Ilya Kirillov 3e6de190e7 [Analysis API] update testdata after adding isNoinline/isCrossinline to the KtValueParameterSymbol 2022-07-05 10:34:29 +02:00
Ilya Kirillov 184478858c [Analysis API] add isNoinline/isCrossinline to the KtValueParameterSymbol 2022-07-05 10:34:29 +02:00
Ilya Kirillov 6a145b52aa [Analysis API] update testdata after adding context receivers 2022-07-05 10:34:28 +02:00
Ilya Kirillov 8f89f1b368 [Analysis API] add info about context receivers to the Analysis API 2022-07-05 10:34:28 +02:00
Ilya Kirillov 21fcb9ccc0 [Analysis API] add checks that KtLifetimeOwners are not leaked to other analyse scope 2022-07-01 21:08:18 +02:00
Ilya Kirillov 00b893444c [Analysis API] remove unneeded analyzeWithSymbolAsContext 2022-07-01 21:08:18 +02:00
Mikhail Glukhikh 2b235e1188 FE10 Analysis API: use compact renderer for flexible types even in debug 2022-06-29 16:50:06 +00:00
Mikhail Glukhikh 38f4a35be2 FIR: introduce flexible types pretty rendering for no arguments case
#KT-52020 Fixed
2022-06-29 16:50:05 +00:00
Mikhail Glukhikh 31ec10142b FirRenderer: add renderAllModifiers and renderDetailedTypeReferences
Related to KT-52020
2022-06-29 16:50:04 +00:00
Stanislav Erokhin 66851c7afd [Analysis API] Add KtReceiverParameterSymbol#correspondingSymbol 2022-06-27 19:32:44 +00:00
Ilya Kirillov 186beddf5c [Analysis API FIR] fix member scope for enum entries 2022-06-24 15:36:32 +00:00
Ilya Kirillov 89ff1f0c0b [Analysis API FIR] fix member scope for enum entries without body 2022-06-24 15:36:32 +00:00
Ilya Kirillov 154a54a1e7 [Analysis API] add more info to the error message of KtCallResolverMixIn 2022-06-24 10:50:31 +02:00
Ilya Kirillov bb7b34b3a1 [Analysis API] introduce KtSymbolOrigin.SUBSTITUTION_OVERRIDE
^KT-52043
2022-06-24 10:41:05 +02:00
Stanislav Erokhin 2234813363 [Analysis API] Add KtCallableMemberCall#typeArgumentsMapping 2022-06-23 07:50:21 +00:00
Stanislav Erokhin 8d8fc6e291 [Analysis API] Add type to KtReceiverValue
Maybe in the future we could remove type from the
KtImplicitReceiverValue, because it has ktSymbol, and in theory
that should be enough to create corresponding KtType.
Unfortunately that is not the case for KtClassOrObjectSymbol --
it doesn't have the API for "default" type creation currently.

Regarding code in KtFirCallResolver.kt -- it seems like code there
needs some love in the future. Psi created via custom code there,
because for call x() FIR has receiver x with psi = null
2022-06-23 07:50:21 +00:00
Kristoffer Andersen 3af0e57406 [FIR-IDE] Add DestructuringDeclarationEntry to SymbolProvider 2022-06-22 21:20:54 +02:00
Jinseong Jeon b6371a5b9a AA/FIR: differentiate dynamic type rendering 2022-06-22 20:14:39 +02:00
Jinseong Jeon 2d52c59bc7 AA: introduce KtDynamicType 2022-06-22 20:14:39 +02:00
Ilya Kirillov d716c68f0e [Analysis API] cleanup code 2022-06-22 09:31:49 +02:00
Ilya Kirillov 37b0c20879 [Analysis API] improve KDoc for scopes 2022-06-22 09:31:49 +02:00