7 Commits

Author SHA1 Message Date
Ilya Chernikov eab5164993 Scripting: fix script lowering in case of out of order declarations
The problem was that in K2 for some top-level script declarations we
need to add a dispatch receiver parameter (because frontend do not
assign any, but representing script as a class requires it to be the
script class) and at the same time, calls to these declarations rely on
properly set dispatch receiver parameter.
The simplest solution found is to have an additional traversal on the
relevan top-level declarations and assigning the dispatch receiver,
before running the main transformation.

#KT-64502 fixed
2024-02-23 22:03:44 +00:00
vladislav.grechko 34bac48541 Add JVM ABI K1/K2 consistency tests 2023-12-26 10:18:19 +00:00
Ilya Chernikov 02e2438d37 K2 Scripting: fix script this receiver handling in IR
also fix accessor lowering
2023-07-05 19:46:04 +00:00
Ilya Chernikov 07df03dbec K2 Scripting: fix capturing in scripts created from Fir 2023-07-05 19:46:04 +00:00
Ilya Chernikov 5824b9c59c K2 Scripting: add Fir script codegen tests
27 failing tests are muted
2023-07-05 19:46:03 +00:00
Ilya Chernikov c1c94778ce Detect and report inner classes capturing script instance 2021-12-14 13:39:22 +03:00
Ilya Chernikov cb5e451e05 Implement script instance capturing in script lowering
for regular classes only. Reimplementing the main behavior of the
old BE and implementing few cases on top of it.
#KT-19423 fixed
2021-12-14 13:39:17 +03:00