Commit Graph

25 Commits

Author SHA1 Message Date
pyos 803abfeba8 FIR: rewrite lambda return type inference
* `return` should only be added to the last statement if the return
   type is not Unit

 * If there is a `return` without an argument, then the expected return
   type is Unit and the last expression is not a return argument (unless
   it's an incomplete call, in which case it is inferred to return Unit;
   this behavior is questionable, but inherited from K1)

 * There should be a constraint on return arguments even if the expected
   type is Unit, otherwise errors will be missed

 * When the expected type is known, using the call completion results
   writer is pointless (and probably subtly wrong).

^KT-54742 Fixed
2023-01-10 15:40:45 +02:00
Pavel Mikhailovskii 906c161068 KT-52791 Make it possible to pass multiple context receivers to a class 2022-12-28 11:21:03 +00:00
Steven Schäfer 6af616d3c3 FIR: make declarations marked with 'override' implicitly open
#KT-52236 Fixed
2022-12-14 21:46:41 +00:00
Steven Schäfer 21fef70367 Standardize context receiver parameter names
Previously, FIR used `_context_receiver_n` while FE10 used `<this>` for
all context receiver parameters. This commit changes the code in FE10
to follow the convention from FIR.
2022-12-03 00:11:38 +01:00
Nikita Nazarov bd742bb95c Account for context class receivers when creating the ExpressionReceiver
^KT-54084 Fixed
2022-09-28 18:59:56 +04:00
Denis.Zharkov 7f7e5c5975 FIR: Fix candidate receivers orders when choosing a context receiver
^KT-53257 Fixed
2022-07-25 15:11:29 +00:00
Denis.Zharkov 9676cd26cf FIR: Adjust Fir2IrText test data 2022-05-19 16:54:04 +00:00
Anastasia.Shadrina a3fa2dc9bf [Tests] Fix contextualInlineCall.kt to avoid subtyping relation error 2022-05-17 15:27:27 +00:00
Denis.Zharkov e632689d90 FIR2IR: Fix case of using context receivers in property initializers 2022-05-13 18:04:02 +00:00
Denis.Zharkov 66bd8dccfa FIR: Unignore all Fir2IrText tests on context receivers 2022-04-06 16:05:40 +00:00
Pavel Kunyavskiy 7ba4d9e1f0 Rework nullability in IR 2022-03-30 06:27:59 +00:00
Alexander Korepanov 69295f2cf0 [JS IR] IC invalidation refactoring
- Huge refactoring for IC
  - Update hash combination logic
  - Introduce value class for IC hashes
  - Calc md5 directly by function IR
  - Split IC logic by classes
  - Move JsIrLinkerLoader into separate file
  - CacheUpdateStatus is a sealed class
  - Render TYPE_PARAMETER reified flag

^KT-51081 Fixed
^KT-51084 Fixed
2022-03-15 05:34:19 +00:00
Anastasia.Shadrina 4b366ddcf6 [BE JVM] KT-51271 Set proper indices generating contextual inline call
[Tests] Test inline call with context receivers and default params
2022-02-18 15:55:43 +03:00
Ivan Kylchik b131c52889 Drop all usages of WITH_RUNTIME directive 2021-12-13 18:07:11 +03:00
Dmitriy Novozhilov 50f610cfd8 [Test] Add forgotten dumps for Fir2Ir text tests 2021-12-06 19:23:14 +03:00
Anastasiya Shadrina 4d3035e2f7 [Parser] Do not support local contextual declarations 2021-12-03 20:22:17 +03:00
Anastasiya Shadrina 2d088196ce [FE] Fill DESCRIPTOR_TO_CONTEXT_RECEIVER_MAP only with CR enabled 2021-12-02 20:25:06 +03:00
Anastasiya Shadrina a70036c945 [Tests] Add a test with type parameter as a context receiver 2021-12-02 20:24:58 +03:00
Anastasiya Shadrina 08570a37b8 [PSI2IR] Check how contextual functional type works with IR 2021-12-02 20:24:56 +03:00
Anastasiya Shadrina 4d0eb74d79 [Tests] Make sure desugaring works with context receivers 2021-12-02 20:24:52 +03:00
Anastasiya Shadrina 0bfea4fc52 [IR, Tests] Fix functionalType sample 2021-12-02 20:24:51 +03:00
Anastasiya Shadrina 17f24319d0 [IR, Tests] Add context receivers count to IR dump 2021-12-02 20:24:46 +03:00
Anastasiya Shadrina 2fbfee3e11 [PSI2IR] Fix parameter initialization for constructors with CR 2021-12-02 20:24:36 +03:00
Anastasiya Shadrina f05ca5be33 [PSI2IR] Additional receiver -> context receiver 2021-12-02 20:24:26 +03:00
Anastasiya Shadrina 3f50b675b1 [Tests] Add irText tests 2021-12-02 20:24:25 +03:00