Commit Graph

99553 Commits

Author SHA1 Message Date
Dmitriy Novozhilov f44fcc811b [FIR] Set proper callable id for delegated members 2023-03-17 12:37:31 +00:00
Mikhail Glukhikh 2fb79bf0b1 K1: don't report InferredIntoDeclaredUpperBound on non-physical element
#KT-56169 Fixed
2023-03-17 12:08:37 +00:00
Mikhail Glukhikh 980ab41ef1 FE: split one more test "buildList type argument is inferred into upper bound"
Related to KT-48445, KT-56169
2023-03-17 12:08:37 +00:00
Mikhail Glukhikh 97bec59bc9 K1: add forgotten INFERRED_INTO_DECLARED_UPPER_BOUNDS for incorporation case
#KT-56169 Fixed
2023-03-17 12:08:36 +00:00
Mikhail Glukhikh ba2d896c01 FE: split test "buildList type argument is inferred into upper bound"
Related to KT-50520, KT-56169
2023-03-17 12:08:35 +00:00
Ilya Chernikov 8edf8573b5 Revert "[K2/N] adjust interop_objc_direct test for K2 because of ^KT-55902"
This reverts commit 8315eeaf92.
2023-03-17 08:57:52 +00:00
Ilya Chernikov 0387ce0365 tmp: implement a hack to fix LA test
due to a missing mechanism to handle a case when LA succeeds while
codegen fails. See detailed comment in the source.
Fixes implicit conversion test introduced in the previous commit.
2023-03-17 08:57:52 +00:00
Ilya Chernikov be2a85be71 K2: support implicit integer to unsigned conversions...
with dedicated opt-in language feature and special
annotation or module capability.
Not intended for a general use, solves specific K/N
scenario with interop libs.
#KT-55902 fixed
2023-03-17 08:57:51 +00:00
Denis.Zharkov 3e2f8b834c K2: Replicate K1 enhancement behavior for warning-mode top-level types
^KT-56657 Fixed
^KT-57307 Related
2023-03-17 08:52:31 +00:00
aleksandrina-streltsova f39d5d57e1 [AA] Fix processing of declared constructors in enhancement scope
^KTIJ-24948 Fixed
2023-03-17 07:27:53 +00:00
Mads Ager 46db4b4e6d [K2] Ignore failing metadata tests while working on them. 2023-03-17 07:15:14 +00:00
Mads Ager 7b7da66d2b [K2] Update JvmDefault compatibility metadata. 2023-03-17 07:15:13 +00:00
Mads Ager 683220a32c [K1] Remove compiler version requirements for context receivers in metadata. 2023-03-17 07:15:13 +00:00
Mads Ager ed84fbd8a6 Sort kotlinp output in tests to reduce diff between K1 and K2. 2023-03-17 07:15:13 +00:00
Mads Ager e051751005 [K2] Use metadata method kind Delegation for delegated members. 2023-03-17 07:15:12 +00:00
Mads Ager 04a088039c [K2] Add support for running Kotlinp tests with K2.
The tests fail spectacularly at this point in time.
2023-03-17 07:15:12 +00:00
Ilya Goncharov f2ecb097f1 [Gradle, JS] Remove webpack 4 support
^KT-57387 fixed
2023-03-16 22:07:31 +00:00
Pavel Kunyavskiy e655e0a809 [K/N] Fix default argument lambda in suspend function code generation 2023-03-16 21:14:41 +00:00
Ilya Goncharov 484d3ad273 [Gradle, JS] Upgrade npm dependencies
^KT-57386 fixed
2023-03-16 19:28:18 +00:00
Ilya Gorbunov 9a7468254d Do not add duplicate content roots to kotlin-dom-api-compat during IDEA sync
Otherwise, stdlib-js source roots are not recognized in the IDE
2023-03-16 18:58:56 +00:00
Mikhail Glukhikh 0ecfcf4380 FIR2IR: make anonymous object constructor public to match K1 behavior 2023-03-16 18:07:36 +00:00
Mikhail Glukhikh e1c2dc06f1 FIR2IR: make handling of FirRegularClass & FirAnonymousObject more consistent
#KT-57221 Fixed
2023-03-16 18:07:36 +00:00
Mikhail Glukhikh 51cd1b2d6f [minor] Fir2IrVisitor: reformat 2023-03-16 18:07:36 +00:00
Mikhail Glukhikh 43a0e7ecbd FIR2IR: add test for KT-57221 2023-03-16 18:07:35 +00:00
Artem Kobzar 758b0ab457 [K/JS] Fix Windows test run with a long test name 2023-03-16 16:48:53 +00:00
nataliya.valtman 37eefc2a05 KT-57296 And backward compatibility with old Idea versions 2023-03-16 16:30:56 +00:00
Dmitriy Novozhilov 6af1c550b6 Update copyright 2023-03-16 15:16:32 +00:00
Dmitriy Novozhilov b6a41c6d93 [CLI] Extract classes of compiler configuration from :compiler:cli to the separate module
Those classes mainly include KotlinCoreEnvironment and its dependencies

This change is needed for two reasons:
1. Splitting of some common configuration of compiler from logic of CLI
    makes code structure more clean
2. There is a need to add dependency on `:analysis:analysis-api-standalone`
    to `:compiler:cli`, because FIR analogue of AnalysysHandlerExtension uses
    services from it. But the problems is that standalone AA itself depends
    on classes for compiler configuration, which leads to circular
    dependency between those modules. Extracting configuration to
    `:compiler:cli-base` solves the problem
2023-03-16 15:16:32 +00:00
Dmitriy Novozhilov 507ef3e951 [FIR] Properly handle declarations from other source sessions in FirPredicateBasedProvider
^KT-57083 Fixed
2023-03-16 15:13:19 +00:00
Denis.Zharkov 644391a8e0 K2: Fix Java enhancement when jsr305.jar is not in classpath
In that case, when loading Java, we just remember the name of `@Nonnull`
argument (javax.annotation.meta.When), and then use it during enhancement

^KT-56656 Fixed
2023-03-16 14:43:05 +00:00
Denis.Zharkov 955b8e1490 K2: Introduce new FIR node kind FirFromMissingDependenciesNamedReference
The basic idea is that during deserialization/loading compiled
Java classes, there might be some of the dependencies absent that
are referenced from enum arguments in annotations.

Such situation is not considered as totally ill-formed, thus supporting
it, allowing to read the names of mentioned in the annotation argument
might be useful for Java enhancement

^KT-56656 In Progress
2023-03-16 14:43:05 +00:00
Denis.Zharkov 157c260fda Add test data with current behavior for KT-56656 2023-03-16 14:43:05 +00:00
Denis.Zharkov bcbe26287a Adjust CLI tests for JSR305 annotations being extracted
See the previous commits
2023-03-16 14:43:04 +00:00
Denis.Zharkov 13febaf978 Adjust tests for JSR305 annotations being extracted
See the previous commits
2023-03-16 14:43:04 +00:00
Denis.Zharkov c86c96f5e5 Extract javax.annotations from third-party/foreign-annotations
Later, JSR 305 related classes will be used to be compiled in a separate
jar that will be used to compile Java, but would be absent in the
Kotlin classpath in ForeignAnnotations-related tests

It's necessary to have a proper test for KT-56656
2023-03-16 14:43:04 +00:00
aleksandrina-streltsova 34c739789f [AA] Fix rendering for type variable with "Type is not inferred"
It is required to show type variable name instead of ERROR in completion
^KTIJ-20913
2023-03-16 13:57:56 +00:00
Dmitrii Gridin bccf1aaff0 [SLC] symbolLightUtils: cleanup code 2023-03-16 11:42:22 +00:00
Dmitrii Gridin 4dbc6654b0 [SLC][tests] rename stopIfCompilationErrorDirectivePresent to isTestAgainstCompiledCode for clarity 2023-03-16 11:42:21 +00:00
Dmitrii Gridin 71299f1d13 [SLC] cover case with invalid java identifier as annotation argument
^KT-56868 Fixed
^KT-57328
2023-03-16 11:42:21 +00:00
Artem Kobzar 948c511284 [K/JS] Rework ES modules part with squashed JsImport and right renaming strategy inside import/export statements 2023-03-16 10:28:39 +00:00
Svyatoslav Kuzmich 3c0048bfd8 [Wasm] Add typealias diagnostic test cases 2023-03-16 09:12:08 +00:00
Svyatoslav Kuzmich 76b4498399 [Wasm] IDL bindings improvements
- Generated types extend JsAny
- Use JsAny instead of Dynamic
- Use JsArray instead of Array
- Use JsNumber, JsString and JsBoolean in JsAny context
- Refactor dictionary constructor functions
2023-03-16 09:12:08 +00:00
Svyatoslav Kuzmich 2a10cf3de2 [Wasm] Dukat: use IDL conversion API directly without dukat CLI
Copy unmodified convertToModel.kt from dukat
2023-03-16 09:12:08 +00:00
Svyatoslav Kuzmich 1208a26fc4 [Wasm] Use JsAny, JsHandle and other Js* types in stdlib and kotlin-test 2023-03-16 09:12:07 +00:00
Svyatoslav Kuzmich d6886d69ec [Wasm] Add internal JsPrimitive annotation
Before external classes could only represent JS object types and are
type-checked with `instanceof`.
@JsPrimitive allows external classes to represent primitive types with
`typeof` checks.
2023-03-16 09:12:07 +00:00
Svyatoslav Kuzmich 1e91fe155b [Wasm] Restrict types allowed in JS interop
- Prohibit Any, Array and other unsupported non-external types in JS
  interop context
- Add K1 diagnostic
- Update BE testdata

^KT-57136 Fixed
2023-03-16 09:12:07 +00:00
Svyatoslav Kuzmich bb05c8528f [Wasm] Fix KtDeclarationWithBody.hasValidJsCodeBody
Empty bodies are not valid jsCode bodies.
2023-03-16 09:12:06 +00:00
Yan Zhulanow c66f1a12cb [LL API] Handle 'KtScript' consistently in file-based provider 2023-03-15 19:22:43 +00:00
Pavel Kunyavskiy 8f4c6eae2f [K/N] Get rid of ArrayAsList class, use .asList() instead
^KT-57137
2023-03-15 18:03:14 +00:00
Nikolay Lunyak 967ddb8bb0 [FIR] KT-57211: Generate FirArrayOfCall for unsigned types
^KT-57211 Fixed

Merge-request: KT-MR-9216
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2023-03-15 17:05:09 +00:00