When calling methods on Arc<MyService> where the method is also defined on Arc (e.g. drop and clone), calling inner.#method_ident(request) will actually attempt to call the Arc method instead of the method on the service, resulting in a compile error. This change removes the ambiguity by dereferencing the inner Arc.
20 lines
459 B
Protocol Buffer
20 lines
459 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package ambiguous_methods;
|
|
|
|
message DropReq {}
|
|
message DropResp {}
|
|
|
|
// The generated stubs can confuse drop and clone
|
|
// with the same method names from Arc,
|
|
// resulting in a compile error.
|
|
service HelloService {
|
|
rpc Drop (DropReq) returns (DropResp);
|
|
rpc Clone (DropReq) returns (DropResp);
|
|
}
|
|
|
|
service HelloStreamingService {
|
|
rpc Drop (DropReq) returns (stream DropResp);
|
|
rpc Clone (DropReq) returns (stream DropResp);
|
|
}
|