Commit Graph

97304 Commits

Author SHA1 Message Date
Dmitrii Gridin cfe8bc682c [LC] fix compatibility 2023-01-04 14:08:16 +00:00
Mikhail Zarechenskiy dc9193893e Add a test to check Java behavior with entries members
Note that there is a questionable behavior that will be fixed later.

 Right now it's not fully clear because for the same situation in Kotlin, the compiler reports warnings at declaration-site and it's not possible to do so for Java

 ^KT-53153
2023-01-04 13:17:11 +00:00
Mikhail Zarechenskiy 3cdbb4876f Add a warning for conflicting entries member
^KT-53153
2023-01-04 13:17:11 +00:00
Mikhail Zarechenskiy cf4b415a20 Add a warning for name shadowing case with Enum.entries
^KT-53153
2023-01-04 13:17:11 +00:00
Mikhail Zarechenskiy c70a1b1884 Add a warning for a custom Enum.entries entry
^KT-53153
2023-01-04 13:17:10 +00:00
Mikhail Zarechenskiy 989fc886e1 Add a warning for a user-defined entries property call
^KT-53153
2023-01-04 13:17:10 +00:00
Mikhail Zarechenskiy 695a538529 Move test about Enum.entries to a more specific folder 2023-01-04 13:17:10 +00:00
Ilya Kirillov 5b9a7c4976 [FIR] do not consider delegate field as local
Otherwise, lazy resolve will never resolve it
2023-01-04 12:50:58 +00:00
Ilya Kirillov 4124a4908f [LL FIR] remove redundant function runCustomResolveUnderLock for locking
 Conflicts:
	analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirDesignatedSupertypeResolverTransformer.kt
2023-01-04 12:50:57 +00:00
Ilya Kirillov d6d066d63b [LL FIR] remove unused function 2023-01-04 12:50:57 +00:00
Ilya Kirillov edbee51edd [LL FIR] Simplify imports resolve 2023-01-04 12:50:57 +00:00
Ilya Kirillov 28ccdd5bde [LL FIR] Simplify file resolve 2023-01-04 12:50:56 +00:00
Ilya Kirillov 256396235b [LL FIR] rework lazy resolve, so it never resolves local declaration
No local declaration should be available until it's fully resolved
2023-01-04 12:50:56 +00:00
Marco Pennekamp a777ffcd8a [AA] KT-55566 StandaloneProjectFactory: Setup JDK default module roots
- Setup JDK default module roots in `StandaloneProjectFactory` (compare
  with `KotlinCoreEnvironment`). The implementation is a distilled
  version of `ClasspathRootsResolver`'s default module handling.
- This fixes an issue where some LL FIR tests with JDK 17 and 11 had
  mismatched types between Kotlin and Java sources.

^KT-55566 fixed
2023-01-04 11:46:11 +00:00
Marco Pennekamp e68111c218 [AA] KT-55566 StandaloneProjectFactory: Setup Java language level before Java files are parsed
- LL FIR tests with Java `record` classes and other new syntax features
  failed because `file.packageName` in `findJvmRootsForJavaFiles`
  caused the Java file to be parsed before the Java language level was
  configured. The Java language level is now set up in
  `registerJavaPsiFacade`, which is early enough.
2023-01-04 11:46:10 +00:00
Pavel Mikhailovskii fed86a57e3 Fix isValidJavaFqName 2023-01-04 11:28:08 +00:00
Dmitriy Novozhilov 4f3add8f7a [FIR] Fix resolution of plugin annotations if only meta annotations are registered 2023-01-04 11:02:01 +00:00
Mikhail Glukhikh 0d50f71fb8 K2: expand type aliases in annotation position #KT-55615 Fixed 2023-01-04 10:06:39 +00:00
Svyatoslav Kuzmich 3cf811012a [Wasm] Reenable gradle integration tests for node and binaryen
* Update to supported node.js version
* Add missing binaryen flag

Merge-request: KT-MR-8180
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2023-01-04 08:35:06 +00:00
Stanislav Ruban 451e27fd46 Regenerate Analysis API tests to include new test cases 2023-01-04 08:08:33 +00:00
Stanislav Ruban ca8cfa4596 KT-55335: Add diagnostics test showing that issue is fixed in K2
^KT-55335: Fixed
2023-01-04 08:08:33 +00:00
Stanislav Ruban 965015bb1e KT-55288: Add diagnostics test showing that issue is fixed in K2
^KT-55288: Fixed
2023-01-04 08:08:32 +00:00
Stanislav Ruban 0f179e8949 KT-33132: Add diagnostics test showing that issue is fixed in K2
^KT-33132: Fixed
2023-01-04 08:08:32 +00:00
Vladimir Dolzhenko 4542b3947b Clean up: rename Jet* to Kt* 2023-01-03 16:36:53 +01:00
Vladimir Dolzhenko d6e587171e Optimize isDefinitelyNotSamInterface
Do not generate intermediate garbage and no reason to iterate over
all non-SAM candidates when more than one found

#KTIJ-23032
2023-01-03 14:36:01 +00:00
Alexander Udalov 397cafcbe8 Remove unneeded runReadAction in getExceptionMessage
Read action is not needed because at the only call site where we try to
read the PSI element text we do it via `Document.getCharsSequence` which
does not require read action.

 #KT-54971 Fixed
2023-01-03 14:23:35 +00:00
Ilya Goncharov a0211fc5fe [Gradle, JS] Deprecation of BOTH and LEGACY consts
^KT-55593 fixed
2023-01-03 12:47:11 +00:00
Alexander Korepanov 3744fbb31b [JS IR] Write IrFile fingerprints to KotlinJs klib manifest
The file fingerprints are going to be used for
 a cache invalidation in JS IR incremental cache.

 It should reduce an incremental rebuild time in JS BE.

 CityHash128 is used as IrFile fingerprint.
2023-01-03 12:30:23 +00:00
Vladimir Dolzhenko 511e05adec Fix test data
Test data had to be adjusted together with a main change

#KTIJ-912
2023-01-03 11:46:20 +00:00
Ilya Kirillov 4a31f82b14 [FIR] use whileAnalysing instead of direct exception handling 2023-01-03 10:23:50 +00:00
Ilya Kirillov 79fe4100aa [FIR] extract exception handing into a service to have additional implementation for the ide 2023-01-03 10:23:50 +00:00
Ilya Kirillov 90436abb23 [FIR] add FirSession parameter to whileAnalysing
It will be needed in the following commits
2023-01-03 10:23:49 +00:00
Alexander Udalov d6d8bf4cbd Update year to 2023 in COPYRIGHT.txt and NOTICE.txt 2023-01-02 22:52:18 +01:00
Alexander Udalov ae6d4d268d Use short copyright from COPYRIGHT_HEADER in generated files 2023-01-02 22:52:18 +01:00
Alexander Udalov 3c4b5529af Update year to 2023 in COPYRIGHT_HEADER.txt
This commit is the result of changing the year to 2023 in
COPYRIGHT_HEADER.txt and running all `generate*` tasks in
`generators/build.gradle.kts`.
2023-01-02 22:52:15 +01:00
Alexander Udalov 7b8b6ef98f Use COPYRIGHT_HEADER in generateBuiltins
It's the same logic that is used in generateTests, and it prevents
master builds from failing as soon as the new year begins. The year in
the COPYRIGHT_HEADER should be updated manually anyway, after which all
the generators will need to be re-run.
2023-01-02 22:50:06 +01:00
Alexander Udalov 2d3f39d1f1 Minor, remove unneeded println in GenerateInterpreterMap 2023-01-02 22:50:06 +01:00
Alexander Udalov 5cb8428326 Minor, remove obsolete bunch file 2023-01-02 22:50:06 +01:00
Dmitrii Gridin 5c6cf57e23 [AA] KtSymbolPointer: add info about semantic to kdoc
^KT-55191
2023-01-02 20:00:50 +00:00
Dmitrii Gridin 0a436d48df [AA] KtSymbolPointer: update kdoc
^KT-55191
2023-01-02 20:00:50 +00:00
Dmitrii Gridin 397f7719d8 [SLC] compareSymbolPointers: add identity check as fast check
^KT-55191
2023-01-02 20:00:50 +00:00
Dmitrii Gridin 25d5a26a72 [AA] KtSymbolPointer: fix comment reference 2023-01-02 20:00:49 +00:00
Dmitrii Gridin 0a003be1f0 [SLC] avoid symbol restoring during comparison
^KT-55191 Fixed
2023-01-02 20:00:49 +00:00
Dmitrii Gridin 13917887e0 [AA] KtSymbolPointer: introduce pointsToTheSameSymbolAs method
^KT-55191
2023-01-02 20:00:49 +00:00
Ilya Chernikov 19a0a1fcd8 K2: add missing MPP warning in LightTree mode 2023-01-02 19:54:57 +00:00
Ilya Chernikov 73e0a5ccd3 K2: Use LightTree by default in modularized tests 2023-01-02 19:54:57 +00:00
Ilya Chernikov 47a4532ea0 K2: update LightTree support in modularized tests 2023-01-02 19:54:56 +00:00
Ilya Chernikov 1a373317ed K2: temporarily disable scripts compilation in LT mode
Should be addressed in the new K2 scripting support soon
2023-01-02 19:54:56 +00:00
Ilya Chernikov 23a27864e5 K2: introduce LT mode config property 2023-01-02 19:54:56 +00:00
Ilya Chernikov 16f52f4c50 K2: use LightTree by default with K2 2023-01-02 19:54:55 +00:00