Commit Graph

99664 Commits

Author SHA1 Message Date
Sergej Jaskiewicz 17a8fd2c0b [test] Move irJsText tests to irText directory
So that all irText tests could be found in one place
2023-03-22 15:18:15 +00:00
Sergej Jaskiewicz ebafdd3af0 [test] Move irText tests from fir2ir/testData to compiler/testData
Let's store them conveniently in one place!
2023-03-22 15:18:15 +00:00
Sergej Jaskiewicz c1ea3e7b53 [test] Give IrText test classes more descriptive names
The names now reflect the frontend and the backend used to run the tests
2023-03-22 15:18:15 +00:00
Pavel Kunyavskiy b01cc1f88c [K2/N] Fix property accessors modality in K2 metadata
^KT-56603
2023-03-22 13:47:01 +00:00
Ilya Chernikov aa3c189d83 FIR: fix return statement generation for Unit-returning lambdas...
for case then the expected return type is not Unit.
#KT-56747 fixed
2023-03-22 13:23:24 +00:00
Nikolay Lunyak 505edb9746 [FIR2IR] KT-57211: Support unsigned arrayOf-s in fir2ir
^KT-57211 Fixed

Merge-request: KT-MR-9294
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2023-03-22 13:10:17 +00:00
Dmitrii Gridin a5e5e093c3 [LL FIR] pass correct phase to AbstractLazyBodyIsNotTouchedTest test
We have lazy expressions on ARGUMENTS_OF_ANNOTATIONS,
so we should decrease the phase to it

^KT-56543
2023-03-22 14:08:39 +01:00
Ilya Goncharov 956682d1ca [Gradle, JS] No specific handling of composite dependencies
^KT-47351 fixed
2023-03-22 13:05:34 +00:00
Alexander Udalov 1bc299508a Fir2Ir: do not skip building static fake overrides for enums
Fake overrides are needed at least for static fields inherited from Java
interfaces. Not static methods though, because they are not inherited.

 #KT-57302 Fixed
2023-03-22 12:34:05 +00:00
Dmitrii Gridin c046bedfc2 [AA FIR] FirLazyAnnotationTransformer: fix resolve contract violation
We can't reduce resolve to COMPILER_REQUIRED_ANNOTATIONS phase for
annotations with arguments, because currently they don't have
argument mapping

```stracktrace
org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments: By now the annotations argument mapping should have been resolved
	at org.jetbrains.kotlin.analysis.api.fir.annotations.FirAnnotationUtilsKt.mapAnnotationParameters(firAnnotationUtils.kt:137)
	at org.jetbrains.kotlin.analysis.api.fir.FirUtilsKt.toKtAnnotationApplication(FirUtils.kt:79)
	at org.jetbrains.kotlin.analysis.api.fir.annotations.FirAnnotationUtilsKt.annotationsByClassId(firAnnotationUtils.kt:60)
	at org.jetbrains.kotlin.analysis.api.fir.annotations.FirAnnotationUtilsKt.annotationsByClassId$default(firAnnotationUtils.kt:46)
```

^KT-57424 Fixed
2023-03-22 10:33:27 +01:00
Ilya Gorbunov 9892a49c4b KT-54452 Use js-ir sources for building stdlib-js sources.jar and API docs 2023-03-22 05:57:14 +00:00
Ivan Kochurkin cd07eba25c [K2, MPP] Fix reporting of MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED 2023-03-22 01:28:19 +00:00
Ivan Kochurkin 60edf1def3 [K2, MPP] Support actualization of enums and annotations that have primary constructor with arguments
^KT-57241 Fixed
2023-03-22 01:28:18 +00:00
Ivan Kochurkin 44807b7bd4 [K2, MPP] Support actualization of actual function with dynamic arguments
^KT-57210 Fixed
2023-03-22 01:28:18 +00:00
Ivan Kochurkin ce7af9ff2b [K2, MPP] Support arguments with expect types in actual functions 2023-03-22 01:28:18 +00:00
Ivan Kochurkin ec34b9fa7b [K2, MPP] Restore ir functions actualization by argument types instead of full signatures
Refactor IrActualizer
2023-03-22 01:28:17 +00:00
Ivan Kochurkin d99b4c78d2 [K2, MPP] Correct actualization of nested objects
^KT-57182 Fixed
2023-03-22 01:28:17 +00:00
Ivan Kochurkin 8a3e2543f7 [K2, MPP] Ignore MPP tests in DiagnosisCompilerTestFE10TestdataTestGenerated 2023-03-22 01:28:17 +00:00
Ivan Kochurkin ceb34e5a8a [K2, MPP] Introduce IGNORE_FIR2IR_EXCEPTIONS_IF_FIR_CONTAINS_ERRORS
Use it for K2 MPP tests
2023-03-22 01:28:16 +00:00
Ilya Chernikov 59b88f33b2 [K2, MPP] implement IR errors reporting and test infrastructure
Fix test data

^KT-56344 Fixed
2023-03-22 01:28:16 +00:00
Ivan Kochurkin 3b1071b42b [FIR LT] Use FILLER_TOKENS instead of DOC_AND_COMMENT_TOKENS in startOffsetSkippingComments 2023-03-22 01:28:16 +00:00
Alexander Udalov 17e4ed8ffc Kapt+JVM_IR: add stub converter test for KT-57388 2023-03-21 22:12:58 +01:00
Mads Ager a525983e38 [JVM IR] Use error types in KAPT mode for unresolved delegate types.
^KT-57388 Fixed
2023-03-21 22:09:14 +01:00
Ivan Kochurkin 5a6e896b45 [FIR] Extract FirDeclarationPresenter to the separated class 2023-03-21 20:24:58 +00:00
Ivan Kochurkin b490130e8e [FIR] Merge DeclarationInspector into FirDeclarationInspector
There is no need of two separated classes
2023-03-21 20:24:58 +00:00
Ivan Kochurkin 07fd778319 [FIR] Optimize FirConflictsDeclarationChecker
Don't allocate inspector without need
2023-03-21 20:24:57 +00:00
Ivan Kochurkin a3e7a35cb1 [FIR] Create separated FirBlock for loop local val
Refactor FIR builders code for ForExpression
2023-03-21 20:24:57 +00:00
Ivan Kochurkin e49bb1fe37 [FIR] Support of REDECLARATION for local val/var, ^KT-54405 Fixed 2023-03-21 20:24:57 +00:00
Ivan Kochurkin 879deb90fc [FIR] Report friendly errors for type aliases from stdlib if -no-jdk option is set
^KT-54531 Fixed
2023-03-21 20:24:56 +00:00
Ivan Kylchik 8eeb7e2631 Modify test data to reflect changes with IntrinsicConstEvaluation 2023-03-21 20:02:44 +00:00
Ivan Kylchik b28d9a1b48 Add new IntrinsicConstEvaluation language feature
This feature will allow to evaluate function marked with
`IntrinsicConstEvaluation` annotation and so use such function
in `const val`.
2023-03-21 20:02:43 +00:00
Ivan Kylchik 6bce668cac Introduce language version 2.1 2023-03-21 20:02:42 +00:00
Pavel Punegov 668dfdd81d [K/N][test] Exclude skia interop test that fails due to ^KT-57484
Merge-request: KT-MR-9291
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-21 18:45:17 +00:00
Simon Ogorodnik a5a3c1ff8d [K2, MPP] Cleanup, remove unused FirDeclaration.actualForExpectMap
The concept of actual for expect map is broken and won't work in IDE
properly, since to fill such map we need to analyze all
dependant modules
2023-03-21 17:16:22 +00:00
Ivan Kylchik 2302e14dd6 [FIR LT] Extract getChildren function into common utils 2023-03-21 16:33:01 +00:00
Ivan Kylchik eb86aabb50 [FIR LT] Unmute some stepping and local variable tests
Corresponding tests were fixed together with #KT-56982, #KT-56913,
#KT-56926
2023-03-21 16:33:00 +00:00
Ivan Kylchik 2b387e7a10 [FIR LT] Get correct startOffset value for declarations with comments
#KT-56913 Fixed
#KT-56926 Fixed
2023-03-21 16:33:00 +00:00
Ivan Kylchik e4591d7af9 [FIR LT] Add proper source for when with subject
#KT-56982 Fixed
2023-03-21 16:33:00 +00:00
Mikhail Glukhikh 45e78455b2 K2: repeat K1 behavior around multiple inheritance by delegation
#KT-56720 Fixed
2023-03-21 16:16:20 +00:00
Mikhail Glukhikh ab883d91c8 FE: add tests to reproduce KT-56720 2023-03-21 16:16:19 +00:00
Marco Pennekamp 4981a52904 [FIR] Extensions symbol provider: Rename create to createIfNeeded 2023-03-21 16:08:43 +00:00
Marco Pennekamp d9f515fbb8 [FIR] KT-57220 Avoid creating useless synthetic function providers
- This optimization applied to LL FIR can be extended to K2 as a whole.
  Likely, there won't be any performance benefits in CLI runs, but it's
  still better to avoid useless symbol providers.
2023-03-21 16:08:43 +00:00
Marco Pennekamp 2d85e9db51 [LL FIR] KT-57220 Optimize & combine synthetic function symbol providers
- Dependency symbol providers contained a lot of useless
  `FirExtensionSyntheticFunctionInterfaceProvider`s, because such a
  provider only generates function classes from compiler plugins. If
  there aren't any such `FunctionTypeKind`s in the session, there is no
  need to even add the provider.
- `FirExtensionSyntheticFunctionInterfaceProvider`s that are added to
  the list of dependency providers despite this optimization will now be
  combined in `LLFirCombinedSyntheticFunctionSymbolProvider`. It checks
  `ClassId` heuristics once, which is more efficient than checking them
  in every provider separately.
2023-03-21 16:08:42 +00:00
Marco Pennekamp 09ab192205 [FIR] Optimize synthetic function symbol provider with ClassId heuristic
- Similar to the implementation of `isNameForFunctionClass` in
  `FirSymbolProvider`, `FirSyntheticFunctionInterfaceProvider` benefits
  from checking the `ClassId` for a digit before accessing its class
  cache.
2023-03-21 16:08:42 +00:00
Marco Pennekamp 79457ec074 [LL FIR] KT-57220 Flatten session dependency symbol providers
- Replace the "recurse one layer deep" approach of
  `LLFirDependentModuleProviders` with a flattened list of dependency
  symbol providers.
- This refactoring is a necessary component of supporting combined
  symbol providers.
2023-03-21 16:08:42 +00:00
Ilya Goncharov 1817213e1d [Gradle, JS] Upgrade yarn.lock 2023-03-21 14:33:42 +00:00
Ilya Goncharov 723aa84ea7 [Gradle, JS] No error on default compiler
^KT-57480 fixed
2023-03-21 13:23:32 +00:00
Denis.Zharkov 38138bf079 K2: Fix bounds erasure for raw types
Basically, this commit reworks eraseToUpperBound* stuff
Instead of a bunch of vague flags, we introduce two modes
(rawTypes/intersection emptiness checker) which defined those flags.

Also, it makes choosing `eraseArgumentsDeeply` option always because
that how it works in K1 and also use invariant projection inside
`eraseArgumentsDeeply` for raw types for the same reason.

^KT-57198 Fixed
2023-03-21 12:38:22 +00:00
Anton Bannykh b0de442d76 JS IR: fix throwable descendants
^ KT-43490 fixed
2023-03-21 12:32:41 +00:00
Nikita Bobko 48ed6c4cc7 2/2 Implement deprecation for use-site '@get:' target
^KT-15470 Fixed
Review: https://jetbrains.team/p/kt/reviews/9250
2023-03-21 13:29:10 +01:00