Commit Graph

19 Commits

Author SHA1 Message Date
Pavel Kunyavskiy e6f4d6e6fa [Tests] Use stable order for ir/kotlinLike dumps
^KT-65406
2024-02-16 10:19:38 +00:00
Sergej Jaskiewicz ad9f7bf90e [IR] Don't use the GET_PROPERTY origin on IrGetField expressions.
This origin was set somewhat arbitrarily.
It actually only makes sense for `IrCall`s to property getters.
There were no places in lowerings that checked `IrGetField` expressions
for this origin value.

^KT-62500 Fixed
2024-01-16 09:26:27 +00:00
Ivan Kylchik 97ba3fe396 [K2] Revert changes done in KT-61786
Changes in this ticket remove type enhancement in java fields
for K2. But after KT-61920 fix, we can actually support it.
2023-12-12 13:54:31 +00:00
Dmitrii Gridin 09a1df9ee5 [codegen] testData: add missing directory structure for Java classes 2023-10-24 10:30:55 +00:00
Ivan Kochurkin 498f2e534a [FIR] Don't enhance Int and String Java final static fields
It's effectively a breaking change (^KT-62558)

K2 assigns flexible type to all static fields (from Java) and, for example,
`String? becomes String unlike K1. It affects IR signature generating.
That's why signature dump is disabled for some tests.

^KT-57811 Fixed
^KT-61786 Fixed
2023-10-16 17:16:56 +00:00
Pavel Kunyavskiy cd409abfd8 [Fir2IR] Fix dispatch receiver of fake override lazy function
After the fix, it's at least consistent with what generated
for other fake overrides.

^KT-61386
2023-09-21 13:09:32 +00:00
Pavel Kunyavskiy 91e96e9f31 [Fir2Ir] Introduce testing with IrFakeOverrideBuilder
^KT-61514
2023-08-31 13:12:15 +00:00
Ivan Kylchik dd264cff50 [IR] Split const folding into necessary one and for optimizations only
In this commit we have a lot of change in test data. This was caused
by the way where we evaluate constants. We split constant evaluation
into two distinct parts: only necessary evaluations for `fir2ir`
(like const val and annotations) and optimizations for lowering.
Now we don't do all constant evaluation on `fir2ir`, but IR
dump is executed after this phase, so test data changed.

#KT-58923
2023-06-14 19:02:39 +00:00
Ivan Kylchik ec4cf40f6f [IR] Allow to fold IrGetField expressions
#KT-58923
2023-06-14 19:02:38 +00:00
Alexander Udalov 82af3dd6ae Tests: fix paths of Java sources in codegen tests
To help them run on the old infrastructure, which light analysis tests
are still using.
2023-06-13 17:48:23 +00:00
Sergej Jaskiewicz fd76a34277 [IR] Don't print flags in declaration references in irText tests
This doesn't reduce the quality of tests, because the flags are still
printed for declarations themselves. We only omit them in references.

However, this makes the tests more compatible with non-JVM backends
(see KT-58605), because flags of referenced stdlib declarations may
differ among target platforms.
2023-05-30 17:26:30 +00:00
Mikhail Glukhikh d436d56871 FE: add some more tests around static field fake overrides 2023-01-26 15:27:58 +00:00
Mikhail Glukhikh 4167a69e30 K2: generate implicit dispatch receivers for static members called
#KT-55371 Fixed
#KT-55372 Fixed
2023-01-26 15:27:57 +00:00
Mikhail Glukhikh 9cfcf057ef K2: expand qualifier type aliases in visibility checker & in FIR2IR
#KT-55408 Fixed
2023-01-26 15:27:56 +00:00
Mikhail Glukhikh 416d4f57eb K2: add test for KT-55371 2023-01-26 15:27:55 +00:00
Mikhail Glukhikh c698d060c6 FIR2IR: support static fake overrides for fields (related to KT-53441)
#KT-54921 Fixed
2022-11-28 17:27:50 +00:00
Mikhail Glukhikh 3a81174a4c FIR2IR: support static fake overrides (functions) #KT-53441 Fixed 2022-11-11 13:30:36 +00:00
pyos e2a83a0ed0 FIR: unwrap intersection overrides when looking for owner class
But not substitution overrides! This is important if the method called
is an intersection override where one of the intersected types is a
subtype of a generic type.
2022-11-11 13:30:32 +00:00
Alexander Udalov 510b9e6f2a Move around some codegen box tests
In tests merged from boxAgainstJava in 29b96aa1, some directories were
named slightly differently compared to box, e.g. "property" vs
"properties", "varargs" vs "vararg". This change renames these, moves
some of the tests to more fitting directories, and also renames
"visibility" to "javaVisibility" because it's about Java visibilities
specifically.
2021-02-11 13:50:09 +01:00