Commit Graph

8 Commits

Author SHA1 Message Date
Alexander Udalov 9935519656 Tests: add RENDER_ALL_DIAGNOSTICS_FULL_TEXT directive
Use it in diagnostic tests with JVM backend instead of the
RENDER_DIAGNOSTICS_FULL_TEXT directive.

This is needed because otherwise in
AbstractDiagnosticsTestWithJvmBackend there are two handlers trying to
dump full diagnostic texts: JvmBackendDiagnosticsHandler and
FirDiagnosticsHandler, which dump different diagnostics (reported by
backend vs frontend) and in slightly different formats.

In fact, this is why exceptionFromInterpreter.fir.diag.txt was added in
48484368c7: the existing .diag.txt was detected as incorrect by
FirDiagnosticsHandler (even though the diagnostics are the same, just
printed in a different way), which led to the creation of .fir.diag.txt.
For these tests, the behavior about checking diagnostic text in
FirDiagnosticsHandler is useless because it doesn't include backend
diagnostics. So we disable it by using another directive.
2023-07-17 16:55:24 +00:00
Alexander Udalov dd3bebb690 Remove obsolete directives in diagnostic backend tests 2023-07-17 16:55:24 +00:00
Nikolay Lunyak bcfafc601e Add EnumEntries to minimal-stdlib-for-tests
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.

Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
2023-03-02 10:23:38 +00:00
Nikolay Lunyak a9343aeb7d [FIR] KT-55840: Ensure everything actually works
This inconsistency is present due to not using the `// WITH_STDLIB`
in the above tests. When K1 creates the enum, it tries to generate
`entries()`, and for that it tries to load `kotlin.enums.EnumEntries`,
but this is actually an unresolved reference. K1 silently swallows it,
and proceeds.

The reason K2 doesn't fail is that in order to generate `entries()` it
simply creates the necessary `ConeClassLikeType` with the desired
`classId` instead of loading the whole `ClassDescriptor`.

The reason we can still observe `$ENTRIES` and `$entries` in K1
is because they are generated during the JVM codegen, and it
only checks if the `EnumEntries` language feature is supported. It
doesn't check if the `entries` property has really existed in IR
(by this time it's expected to have already been lowered to the
`get-entries` function - that's why "has ... existed").

The reason why the codegen doesn't fail when working with
`kotlin.enums.EnumEntries` is because it creates its
own `IrClassSymbol`.

^KT-55840 Fixed

Merge-request: KT-MR-8727
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2023-02-10 16:57:51 +00:00
Ivan Kylchik 001ecaa9b2 Support RENDER_DIAGNOSTICS_FULL_TEXT directive in new test infra 2022-05-18 21:20:03 +03:00
Ivan Kylchik 51ccc32a3f Update test data after introducing IntrinsicConstEvaluation annotation 2022-05-18 21:19:57 +03:00
Ilya Chernikov c1c94778ce Detect and report inner classes capturing script instance 2021-12-14 13:39:22 +03:00
Ilya Chernikov 10c5071eda Implement backend error reporting on unsupported script capturing
#KT-30616 fixed
#KT-43995 fixed
#KT-19424 fixed
#KT-49443 fixed
2021-12-14 13:39:17 +03:00