Open
Description
The current codegen only supports methods defined inline, so we can't extend the RPC definition interface, which is useful for re-using method definitions.
Here's a quick example:
interface SharedCalls {
suspend fun inherit()
}
interface DefinitionRpc : RPC, SharedCalls {
suspend fun inline()
}
suspend fun executeRpc() {
val http = HttpClient {
installRPC()
}
val rpc = http.rpc().withService<DefinitionRpc>()
// client code expects these to work
rpc.inline()
rpc.inherit()
}
As the codegen wont generate the inherit
method so the class DefinitionRpcClient
wont compile, leading into this error:
Class 'DefinitionRpcClient' is not abstract and does not implement abstract member public abstract suspend fun inherit()
Metadata
Assignees
Labels
No labels