Commit Graph

18 Commits

Author SHA1 Message Date
vladislav.grechko 34bac48541 Add JVM ABI K1/K2 consistency tests 2023-12-26 10:18:19 +00:00
Alexander Udalov 953f6ba6b6 K2: keep FlexibleNullability on enhanced type parameter types
Types based on type parameters which have both hasEnhancedNullability
and hasFlexibleNullability were incorrectly converted to IR: only
`@EnhancedNullability` annotation was added to the IR type. This means
that the nullability of the type started to matter, which is incorrect
because the type is supposed to be flexible.

This backfired in the IR fake override builder mode, where nullability
of methods inherited from both Kotlin maps and Java maps clashed, which
resulted in the exception from FakeOverrideRebuilder.

If the type is both flexible and enhanced, we're now adding
`@FlexibleNullability` to the IR type. Note that `@EnhancedNullability`
is not needed because it only affects primitive types which need to be
handled as wrapper types on JVM, but `@FlexibleNullability` already has
that effect.

IR still slightly differs from K1 for collection subclasses, which can
be seen for example in the changed IR text tests. This is to be
investigated later.

The change in tests is needed because the `kt48495*.kt` tests are now
passing on K2 in the IR fake override builder mode, while failing on the
vanilla K2.

This is related to KT-61370 but does not entirely fix it, although
curiously it fixes all remaining tests which were muted because of it.
2023-11-09 09:13:28 +00:00
Pavel Kunyavskiy 91e96e9f31 [Fir2Ir] Introduce testing with IrFakeOverrideBuilder
^KT-61514
2023-08-31 13:12:15 +00:00
Alexander Udalov 3120a35a88 JvmDefault: remove most tests on @JvmDefault
The tests are removed because JvmDefault is going to be deprecated with
error in KT-54746 and removed later in KT-57696.

Many of the removed tests already had existing counterparts with the new
modes `all` and `all-compatibility`. In this change, I've added such
tests where they were missing, and removed tests which were testing
behavior specific to the JvmDefault annotation, such as some
diagnostics.

 #KT-54746
2023-04-25 14:33:00 +00:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Ilya Chernikov 8f5d5c3ace FIR: Fixes in testdata after implementing FIR-specific IrBuiltIns 2021-07-16 02:24:29 +03:00
Andrey Zinovyev 64b45e6d1b Add comments to skipped FIR tests 2021-05-25 19:23:30 +03:00
Mikhail Glukhikh d3e85dbce0 [FIR] Implement replacing Object with type parameters for specials builtins
#KT-42601 Fixed
2020-10-23 08:12:15 +03:00
Mikhail Glukhikh b6cdcc8d50 [FIR2IR] Mute 2 failing BB tests 2020-05-28 22:51:20 +03:00
Jinseong Jeon eac9af521e [FIR2IR] differentiate external Java stub origin from external stub 2020-05-08 17:45:39 +03:00
Steven Schäfer 07737f8fc6 JVM IR: Fix BridgeLowering 2020-02-07 18:44:50 +03:00
Mads Ager 15ed342282 JVM_IR: Generate args check in existing methods for special bridge methods.
Fix the number of arguments checked (1 for getOrDefault and 2 for
remove).
2019-11-19 19:10:04 +03:00
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Jiaxiang Chen afcbd76c9e Implement stub methods generation for Kotlin Immutable Collection classes.
This change is to fill the gap between Kotlin Collection
classes(immutable) and Java Collection classes(mutable), to avoid
calling an unsupported operation like remove() on an immutable class in
jvm.
2019-05-21 17:20:20 +03:00
Alexander Udalov e3c381a298 Remove API_VERSION 1.3 from tests on JvmDefault
So that these tests will now check behavior on the latest API version
2018-12-20 12:53:23 +01:00
Mikhael Bogdanov a4206a543a Skip test on JDK 6 2018-10-22 16:32:55 +02:00
Mikhael Bogdanov 5b8acd69e3 Mute JVM IR tests 2018-10-22 16:32:53 +02:00
Mikhael Bogdanov ac8e1a0124 Move JVM8 box test to common 2018-10-22 16:32:52 +02:00