Commit Graph
1209 Commits
Author SHA1 Message Date
Vsevolod Tolstopyatov 22e26d0756 Move EnumEntries LVS to 1.9
* Also cleanup tests to avoid using obsolete WITH_RUNTIME
2022-08-12 09:35:32 +00:00
Mikhail Glukhikh 10ffdab438 Analysis API FIR: fix isDefaultEnumEntryMember 2022-08-12 09:35:31 +00:00
Mikhail Glukhikh 41b73abc49 Analysis API FIR: fix exception in LC support for Enum.entries property 2022-08-12 09:35:30 +00:00
Mikhail Glukhikh 7333589663 K1/K2: add Enum.entries unconditionally and filter them out in tower
Before this commit, we added Enum.entries only in case when
LanguageFeature.EnumEntries was ON (with an exception in K1/Java case).
In this commit we add Enum.entries unconditionally, and in case
the language feature is OFF we filter them out during tower resolve.
2022-08-12 09:35:27 +00:00
Mikhail Glukhikh 81e1131441 SubclassOptInRequired: add extra test about inheritance and superseding 2022-08-11 14:05:09 +00:00
Mikhail Glukhikh 80a9f22052 Add applicability checks & tests for SubclassOptInRequired 2022-08-11 14:05:09 +00:00
Mikhail Glukhikh c67c5cad27 K1: report errors related to SubClassOptInRequired annotation
Related to KT-41886
2022-08-11 14:05:07 +00:00
Pavel Mikhailovskii 8ba80b4b7b KT-1436 Allow break/continue in inlined lambdas 2022-08-11 10:38:23 +00:00
Ilya Kirillov 1c28eef82a [LL FIR] rename FirLazyDeclarationResolver -> LLFirModuleLazyDeclarationResolver
to avoid naming collisions with LLFirLazyDeclarationResolver
2022-08-10 22:49:19 +02:00
Ilya Kirillov 0748f28efe [FIR] rename ensureResolve -> lazyResolveToPhase as it better describes function semantics 2022-08-10 22:49:18 +02:00
Ilya Kirillov e7e9c24473 [LL FIR] update lazy resolve testdata after changes in phases 2022-08-10 22:49:18 +02:00
Ilya Kirillov 230c21f502 [LL FIR] fix not-resolved getter return type in on-air resolve 2022-08-10 22:49:18 +02:00
Ilya Kirillov 9f1ecdfaa1 [LL FIR] add lazy resolve check to ensure that all nested declarations are resolved
This bow includes: value parameters, property accessors and class members;
before, only class members was checked
2022-08-10 22:49:17 +02:00
Ilya Kirillov 75787be2f8 [Analysis] change null element rendering in exceptions to distinguish will "null" strings 2022-08-10 22:49:17 +02:00
Ilya Kirillov 107a8e4d92 [FIR] create error type ref for parameter when one is required instead of implicit type in RawFirBuilder
Needed to avoid failure during lazy resolving of corresponding declarations in the IDE

^KTIJ-22357 fixed
2022-08-10 22:49:16 +02:00
Ilya Kirillov b27115c793 [LL FIR] rename ensurePhase -> checkPhase to distinguish with ensureResolved 2022-08-10 22:49:15 +02:00
Ilya Kirillov 88c68be12d [Analysis API FIR] add additional information to exceptions from call resolution 2022-08-10 22:49:15 +02:00
Ilya Kirillov f45f1ba3dc [Analysis API] do not create multiple attachments inside exceptions 2022-08-10 22:49:14 +02:00
Ilya Kirillov 72da40f97c [LL FIR] update phase of type parameters on lazy resolve 2022-08-10 22:49:14 +02:00
Ilya Kirillov 0f6f901179 [LL FIR] render type parameters resolve phase in tests 2022-08-10 22:49:13 +02:00
Ilya Kirillov cd063d0cd0 [LL FIR] update phase of value parameters on lazy resolve
Previously, such phases may not be properly set which could cause additional lazy resolve
2022-08-10 22:49:13 +02:00
Ilya Kirillov 56e6d5d6b9 [Analysis API] do not preresolve all FirDeclarations to TYPES in tests
Previously, we resolved all declaration to the TYPES phase to collect their sealed inheritors
and thus not really checking lazy resolution to TYPES.
Now sealed class inheritors collection happens in separate LLFirResolveSession
2022-08-10 22:49:13 +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 8856977c78 [Symbol LC] add test for declaration parents 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 b173b1fe24 AA: use package part info (if available) when searching for PSI from binary module 2022-08-10 17:34:48 +02:00
Jinseong Jeon d0a8eb5c54 AA FIR: use resolved annotation argument mapping 2022-08-10 17:34:48 +02:00
Jinseong Jeon 56a5d883c0 AA FIR: handle (aliased)? annotation w/ vararg parameter 2022-08-10 17:34:48 +02:00
Dmitry Gridin 434872c5a9 [slc] mark SymbolFakeFile as internal
^KT-50241
2022-08-09 21:08:43 +02:00
Dmitry Gridin 74ad591dcb [slc] rename fir to symbol
^KT-50241
2022-08-09 12:09:00 +02:00
Dmitry Gridin c0d6a64a8a [slc] rename fir to symbol
^KT-50241
2022-08-08 19:08:46 +00:00
Jinseong Jeon 4531080858 AA: introduce KtNotUnderContentRootModule impl to standalone mode
to gracefully handle element/file/etc without a binding module.

This could happen, e.g.,
1) source PSI created from KtPsiFactory, which uses literally dummy.kt
2) debugger that creates a code fragment on-the-fly
3) on-air analysis of non-physical files
2022-08-06 13:18:55 +02:00
Jinseong Jeon e8e88b4eb2 AA: deprecate utils in StandaloneUtils
...in favor of StandaloneAnalysisAPISessionBuilder
2022-08-06 13:18:54 +02:00
Mikhail Glukhikh 2598ecf23f Revert "K2: fix internal visibility checks for overrides #KT-53197 Fixed"
This reverts commit 166965e559.
2022-08-05 18:26:59 +02:00
Dmitry Gridin 4ceb170917 regenerate tests 2022-08-05 14:12:41 +02:00
Dmitry Gridin a925b6b47d [slc] reformat code
^KT-50241
2022-08-05 14:12:40 +02:00
Dmitry Gridin 4c3090e476 [slc] update copyright
^KT-50241
2022-08-05 14:12:40 +02:00
Dmitry Gridin 4419d7cd9e [slc] fix packages
^KT-50241
2022-08-05 14:12:40 +02:00
Dmitry Gridin 0016973d2e [slc] add todo
^KT-50241
2022-08-05 14:12:40 +02:00
Dmitry Gridin 6f40c097f1 [slc] cleanup code
^KT-50241
2022-08-05 14:12:40 +02:00
Artem Kobzar 2d85eddeb9 [FIR] test: add a test case for reified inline functions with a same name in different packages. 2022-08-04 22:56:07 +02:00
Denis.Zharkov 11a26e540e Revert "KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing"
This reverts commit a2077f9063.
2022-08-04 17:50:00 +02:00
Denis.Zharkov 2ae2a7e442 Revert "KT-8263: Conditional operators are not parsed correctly"
This reverts commit 85800b4f9f.
2022-08-04 17:49:42 +02:00
Ilya Kirillov 6be2483824 [Analysis API FIR] rethrow IndexNotReadyException 2022-08-04 14:33:44 +00:00
Iven Krall 85800b4f9f KT-8263: Conditional operators are not parsed correctly 2022-08-04 11:24:09 +00:00
Iven Krall a2077f9063 KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing 2022-08-04 11:24:08 +00:00
Mikhail Glukhikh 166965e559 K2: fix internal visibility checks for overrides #KT-53197 Fixed 2022-08-03 07:52:14 +00:00
Jinseong Jeon 009182af63 FIR LC: use the data path from the test base 2022-08-03 08:57:37 +02:00