File tree Expand file tree Collapse file tree 5 files changed +36
-12
lines changed
compiler-plugin/compiler-plugin-backend/src/main
core/kotlinx/rpc/codegen/extension
latest/kotlinx/rpc/codegen
tests/compiler-plugin-tests/src/test-gen/kotlinx/rpc/codegen/test/runners Expand file tree Collapse file tree 5 files changed +36
-12
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,16 @@ class IrMemberAccessExpressionBuilder(private val vsApi: VersionSpecificApi) {
2323 private var valueArguments: List <IrExpression > = emptyList()
2424 private var typeArguments: List <IrType > = emptyList()
2525
26+ val typeBuilder = TypeBuilder ()
27+
2628 fun types (builder : TypeBuilder .() -> Unit ) {
27- TypeBuilder () .builder()
29+ typeBuilder .builder()
2830 }
2931
32+ val valueBuilder = ValueBuilder ()
33+
3034 fun values (builder : ValueBuilder .() -> Unit ) {
31- ValueBuilder () .builder()
35+ valueBuilder .builder()
3236 }
3337
3438 inner class TypeBuilder {
Original file line number Diff line number Diff line change @@ -413,6 +413,10 @@ internal class RpcStubGenerator(
413413 )
414414
415415 arguments {
416+ types {
417+ + fieldType
418+ }
419+
416420 values {
417421 + lambda
418422 }
@@ -737,6 +741,10 @@ internal class RpcStubGenerator(
737741
738742 val arrayOfCall = irCall(callee, type = ctx.arrayOfAnyNullable).apply arrayOfCall@{
739743 if (methodClass.isObject) {
744+ arguments {
745+ types { + ctx.anyNullable }
746+ }
747+
740748 return @arrayOfCall
741749 }
742750
@@ -1226,6 +1234,13 @@ internal class RpcStubGenerator(
12261234 )
12271235 }.apply mapApply@{
12281236 if (isEmpty) {
1237+ arguments {
1238+ types {
1239+ + ctx.irBuiltIns.stringType
1240+ + rpcCallableType
1241+ }
1242+ }
1243+
12291244 return @mapApply
12301245 }
12311246
@@ -1377,6 +1392,10 @@ internal class RpcStubGenerator(
13771392 )
13781393 }.apply arrayOfCall@{
13791394 if (parameters.isEmpty()) {
1395+ arguments {
1396+ types { + ctx.rpcParameter.defaultType }
1397+ }
1398+
13801399 return @arrayOfCall
13811400 }
13821401
@@ -1593,6 +1612,10 @@ internal class RpcStubGenerator(
15931612 type = anyListType,
15941613 ).apply listApply@{
15951614 if (isEmpty) {
1615+ arguments {
1616+ types { + ctx.anyNullable }
1617+ }
1618+
15961619 return @listApply
15971620 }
15981621
Original file line number Diff line number Diff line change @@ -151,8 +151,13 @@ object VersionSpecificApiImpl : VersionSpecificApi {
151151
152152
153153 override fun IrMemberAccessExpressionData.buildFor (access : IrMemberAccessExpression <* >) {
154- access.dispatchReceiver = dispatchReceiver
155- access.extensionReceiver = extensionReceiver
154+ if (dispatchReceiver != null ) {
155+ access.dispatchReceiver = dispatchReceiver
156+ }
157+
158+ if (extensionReceiver != null ) {
159+ access.extensionReceiver = extensionReceiver
160+ }
156161
157162 valueArguments.forEachIndexed { index, irExpression ->
158163 access.putValueArgument(index, irExpression)
Original file line number Diff line number Diff line change 11
22
3- /*
4- * Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
5- */
6-
73package kotlinx .rpc .codegen .test .runners ;
84
95import com .intellij .testFramework .TestDataPath ;
Original file line number Diff line number Diff line change 11
22
3- /*
4- * Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
5- */
6-
73package kotlinx .rpc .codegen .test .runners ;
84
95import com .intellij .testFramework .TestDataPath ;
You can’t perform that action at this time.
0 commit comments