Commit Graph

14 Commits

Author SHA1 Message Date
Alexander Korepanov f5d0c22736 [K2 JS] Unmute and link to issue some JS K2 tests 2024-01-18 15:48:55 +00:00
Artem Kobzar 08bd0d6ce1 [K/JS] Generate tests for K2 + ES-classes compilation 2023-08-01 09:16:20 +00:00
Artem Kobzar 71486a321c [K/JS] Add support of compilation with ES-classes 2023-01-17 18:14:17 +00:00
Marco Pennekamp 5f554d0065 [FIR] KT-54980 Fix resolvability of too few/too many type arguments
- If too few or too many type arguments were provided, they were all
  thrown away in `TypeArgumentMapping`,
  `FirCallCompletionResultsWriterTransformer`, and `KtFirCallResolver`.
  The fix handles type arguments of the wrong arity more gracefully.
  - Note for `TypeArgumentMapping`: Excess type arguments are not needed
    for candidate resolution. Excess type arguments are still resolved
    due to the handling in `FirCallCompletionResultsWriterTransformer`.
- Post-processing in `AllCandidatesResolver`: When all candidates are
  resolved in `AllCandidatesResolver.getAllCandidates`, the function
  builds a FIR file. During that resolution, the
  `generic<String, String>` call (in example
  `functionCallWithTooFewTypeArguments.kt`) is correctly marked as
  inapplicable, but the missing type argument is inferred as an error
  type. `firFile` then contains a function call
  `generic<String, String, ERROR>` instead of `generic<String, String>`.
  This call is still marked as inapplicable. Despite that, the
  *subsequent* resolution by
  `bodyResolveComponents.callResolve.collectAllCandidates` disregards
  the call's inapplicability and resolves successfully into an
  applicable candidate. This is because `CandidateFactory` doesn't make
  any guarantees for already inapplicable calls. The fix adds
  post-processing to `AllCandidatesResolver` to preserve candidate
  inapplicability.
- Most tests that this commit changes had slightly different results due
  to type arguments becoming resolvable.
- `wrongNumberOfTypeArguments.kt` and
  `wrongNumberOfArgumentsInTypeAliasConstructor.kt`:
  `ConeDiagnostic.toFirDiagnostics` prefers specific errors. Because
  `ARGUMENT_TYPE_MISMATCH` is specific and `INAPPLICABLE_CANDIDATE` is
  not, only the former is reported. I see no reason to pass an illegally
  typed argument in either test, so the change reduces the errors to
  `INAPPLICABLE_CANDIDATE`.
- `typeAliasSamAdapterConstructors2.fir.kt`: See KT-55007.
- Disable `mismatchTypeParameters` JS backend test due to its handling
  of excess type arguments. See KT-55250.

^KT-54980 fixed
2023-01-02 16:36:02 +00:00
Dmitriy Novozhilov b174bb8844 [FIR] Update testdata after introducing FirResolvedErrorReference 2022-12-15 12:12:19 +00:00
Marco Pennekamp dbb02a9bfb [FIR] Fir2IrJsResultsConverter: Compute hasErrors of backend input
- This allows us to re-enable 3 tests.
2022-12-08 13:01:17 +00:00
Ilya Chernikov 78ca733c38 FIR JS: add K2 variants of all other JS tests
except tests that are not possible to add without some modifications in
the test infra. See todos on the commented-out test declarations
2022-11-12 16:28:24 +01:00
Ilya Goncharov 002d62de89 rra/ilgonmic/revert-signatures-changes
[JS IR] Fix line number test

[JS IR] Ignore isInstance repl test

[JS IR] Ignore isInstance repl test

[JS IR] Add test with unsafe variance

Revert "[JS IR] Optimize away upcasts"

This reverts commit 8149189585.

Get rid of duplicated signatures

Revert "[JS IR] Consider erasing type parameters in return type in js signatures"

This reverts commit 6adcbe081e.

Revert "rra/ilgonmic/exported-bridges-2 [JS IR] Use js name for signature"

This reverts commit 00289d35

[JS IR] Leave as is

[JS IR] Add test with overloading by generic

[JS IR] Add test from master

[JS IR] Add tests from master

Merge-request: KT-MR-5987
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51700 fixed
^KT-51523 fixed
^KT-51685 fixed
2022-04-05 15:35:12 +00:00
Sergej Jaskiewicz 8149189585 [JS IR] Optimize away upcasts
#KT-50212 Fixed
2022-01-28 10:03:53 +00:00
Anton Bannykh 9c4c798fe7 [JS IR] mute tests with wrong linkage 2021-12-01 16:50:16 +03:00
Ivan Kylchik 982d10d127 [TESTS] Add IGNORE_ERROR directive to boxError tests
This is needed because now these tests use new test infrastructure
and here, after frontend facade, there is error check. We need to
disable such check in these tests.
2021-11-08 23:50:34 +03:00
Zalim Bashorov df6635085b [JS IR] Replace calls with invalid type arguments for type parameters with call to errorCode function from runtime. 2020-12-24 20:03:22 +03:00
Roman Artemev f4830c88b9 [JS IR] Make error code tests modular 2020-10-15 13:55:06 +03:00
Roman Artemev 0bff406a12 [JS IR] Add infra to test compilation with error
- add bunch of tests
 - fix help test
2020-09-01 14:53:08 +03:00