Commit Graph

2748 Commits

Author SHA1 Message Date
Andrei Klunnyi decfcd28d2 KT-39398 Wrong import of unrelated object member is suggested for receiver
Receiver of a function call '<receiver>.foo()' (where receiver is a
class/object/alias name) might be specified incorrectly - corresponding
[companion] object might not be declared.

Before this commit '<receiver>' was considered to be undefined (null).
As a consequence, import suggestion included all 'foo()' functions from
the search scope.

Now as a value of '<receiver>' we set class/object/alias itself
resulting in an empty import suggestion list.
See org/jetbrains/kotlin/idea/util/CallType.kt:307
(#extractReceiverTypeFrom(descriptor: ClassDescriptor)).
2021-07-07 16:51:43 +02:00
Nikita Bobko 365821ae54 2/2 Extract code which is required for :kotlin-scripting-ide-services from ide-common into seprate module
Extract the code and keep it in Kotlin repo. See previous preparation commit as well
2021-07-07 16:51:43 +02:00
Nikita Bobko cf3f35e1c8 1/2 Preparation commit: move ide-common files which are required for scripting to separate directory
This commit is needed to preserve git history
2021-07-07 16:51:43 +02:00
Ilya Kirillov 51576c70b6 FIR: introduce package directive
The package directive is needed for KtElement -> FirElement mapping in IDE.
There should be some FirElement which will be result of mapping of elements
inside KtPackageDirective.
2021-07-06 22:49:50 +03:00
Sergey Shanshin 0d211a53cb Support serializable classes clash with JVM primitive types by name
Fixes Kotlin/kotlinx.serialization#1353
2021-07-06 12:52:53 +03:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Andrey Zinovyev 1130344fb1 [lombok] Get field names directly from JavaClassImpl
Otherwise it fails with recursion on annotation types
#KT-47513 Fixed
2021-06-30 10:44:31 +03:00
Dmitriy Novozhilov f400477c70 [FIR] Remove generic parameter from FirDeclaration 2021-06-29 21:03:30 +03:00
Dmitriy Novozhilov 725be466f0 [FIR] Move declaration utils to separate package 2021-06-29 21:03:29 +03:00
Dmitriy Novozhilov 1324e9223f [FIR] Make FirDeclaration an abstract class 2021-06-29 21:03:28 +03:00
Dmitriy Novozhilov b3e5c6e079 [FIR] Add symbol to all declarations. Get rid of FirSymbolOwner 2021-06-29 21:03:28 +03:00
Andrey Zinovyev c8fa8b0444 [lombok] Don't fail on fake overrides
#KT-47455 Fixes
2021-06-27 13:46:09 +03:00
Nikita Bobko 938cd955e1 Remove :idea prefix in IDE FIR modules which are going to stay in kotlin repo
This commit fixes not possibility to build project with `disableKotlinPluginModules`
flag on because Gradle tries to resolve `:idea` module which is disabled
2021-06-22 03:06:16 +03:00
Jinseong Jeon bc09d94717 FIR UAST: running resolve API tests for both plugins 2021-06-21 13:49:47 +03:00
Jinseong Jeon 610b68c29d FIR/UAST: commonize expressions with label 2021-06-21 13:49:46 +03:00
Jinseong Jeon fa613a32b2 FIR/UAST: commonize safe qualified expression 2021-06-21 13:49:45 +03:00
Jinseong Jeon 2999d0bd4b FIR/UAST: commonize double colon expressions 2021-06-21 13:49:44 +03:00
Jinseong Jeon 77e8aed995 FIR/UAST: move multi resolve utils/APIs to the base module/service 2021-06-21 13:49:42 +03:00
Jinseong Jeon e870bf7399 FIR/UAST: commonize simple reference expression 2021-06-21 13:49:41 +03:00
Jinseong Jeon 4ec745abd7 FIR: relax simple type requirement in AbstractTypeMapper
The counterparts in old FE don't have such restriction, so it can
map a type that has a flexible type as a type argument to JVM type,
e.g., Stream<String..String?>
2021-06-21 13:49:40 +03:00
Jinseong Jeon 08e486d1a7 FIR/UAST: commonize dot qualified expression 2021-06-21 13:49:39 +03:00
Ilya Kirillov f00170eb31 FIR IDE: add missing runtime dependencies for tests 2021-06-21 02:50:11 +02:00
Jinseong Jeon 833761ac3c FIR IDE/UAST: add KtCompileTimeConstantProvider with evaluate API 2021-06-19 21:58:41 -07:00
Jinseong Jeon cda1a7edbe FIR/UAST: commonize UAnnotationMethod 2021-06-19 11:39:46 +02:00
Jinseong Jeon 638b0beadb FIR UAST: unify UMethod creation 2021-06-19 11:39:46 +02:00
Jinseong Jeon 5ec5b7f041 FIR/UAST: commonize constructor declarations 2021-06-19 11:39:45 +02:00
Jinseong Jeon cbaa645dbe FIR/UAST: commonize base UMethod 2021-06-19 11:39:45 +02:00
Jinseong Jeon 4a06ca637a FIR/UAST: commonize anonymous UClass 2021-06-19 11:39:45 +02:00
Jinseong Jeon 3bd4cb274d FIR/UAST: commonize invalid UClass 2021-06-19 11:39:44 +02:00
Jinseong Jeon 1749c90083 FIR/UAST: commonize base UClass (with bogus annotation abstraction) 2021-06-19 11:39:44 +02:00
Jinseong Jeon 06c20bb10e FIR/UAST: commonize abstraction of Kotlin UClass 2021-06-19 11:39:43 +02:00
Jinseong Jeon 0c011f4e73 UAST: place method declarations together 2021-06-19 11:39:43 +02:00
Jinseong Jeon beddf03f74 FIR/UAST: convert annotation via base converter 2021-06-19 11:39:42 +02:00
Jinseong Jeon 33ff90a6da FIR/UAST: commonize named/vararg expressions 2021-06-19 11:39:42 +02:00
Jinseong Jeon dcf99e9fd1 UAST: delete redundant file
This is rather a test input, and indeed there is testData/Suspend.kt
2021-06-19 11:39:42 +02:00
Jinseong Jeon 4e4b104488 FIR/UAST: commonize expression list 2021-06-19 11:39:41 +02:00
Jinseong Jeon 2e58b57db9 UAST: remove redundant override: expression list's evaluate()
The super function in `KotlinEvaluatableUElement` is almost same,
except for handling of `UnsignedErrorValueTypeConstant`.
Such handling was added later, so I assume the addition to this override
was missed. In any cases, this override is unnecessary.
2021-06-19 11:39:41 +02:00
Jinseong Jeon 31d1c002c5 FIR UAST: implement constructors/delegations
But, the logic is identical to the counterpart in FE1.0 UAST
Many declaration abstractions, such as (primary|secondary) constructor
methods and class, are very similar, and thus can be commonized soon
once the remaining parts (in particular, annotations) are done.
2021-06-19 11:39:40 +02:00
Vyacheslav Gerasimov 58f1fb644f Build: Stop publishing jars with original classifier
#KTI-580
2021-06-17 19:43:10 +03:00
Jinseong Jeon 0db510ad8b FIR IDE/UAST: introduce UAST-specific version of analyse 2021-06-13 00:10:46 +03:00
Jinseong Jeon 1517fd0ca0 FIR/UAST: commonoize array access expression 2021-06-13 00:10:45 +03:00
Jinseong Jeon ef8eddf1da FIR UAST: add array access tests 2021-06-13 00:10:44 +03:00
Jinseong Jeon 9a539aac7d FIR/UAST: commonize binary expression with type 2021-06-13 00:10:43 +03:00
Jinseong Jeon b2e644b485 FIR/UAST: commonize type check expression 2021-06-13 00:10:41 +03:00
Jinseong Jeon 6e0f755b39 UAST: migrate kinds constants to the base module 2021-06-13 00:10:39 +03:00
Jinseong Jeon 47ede5bdc8 FIR IDE/UAST: get PsiType from KtTypeReference 2021-06-13 00:10:38 +03:00
Jinseong Jeon a3710bed6a FIR/UAST: commonize type reference expression 2021-06-13 00:10:37 +03:00
Jinseong Jeon 517fd24f14 UAST: unify implementation/creation of type reference expression 2021-06-13 00:10:36 +03:00
Jinseong Jeon fa36098214 FIR IDE/UAST: get PsiType from KtExpression 2021-06-13 00:10:34 +03:00
Jinseong Jeon 8977e7766b FIR/UAST: commonize throw expression 2021-06-12 16:00:43 +02:00