-
Notifications
You must be signed in to change notification settings - Fork 187
Generated code contains error "is not a function call" for basic sample .proto #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for reporting this. |
|
I talked to @sigurdm about this. The issue is in this generated code: abstract class PeerServiceBase extends $grpc.Service {
$async.Future<$0.Message> request_Pre(
$grpc.ServiceCall call, $async.Future<$0.Message> request) async {
return request(call, await request); // <-------- this line
}
$async.Future<$0.Message> request($grpc.ServiceCall call, $0.Message request);
} In the marked line above, the first The argument name is hard-coded as
To fix this we should avoid shadowing stuff with argument names in generated methods. We should somehow make sure we generate unique names for arguments. Depending on how we generate method names it may suffice to add |
@sigurdm points out that we could also add |
#485 is the same issue but the method name is |
…hadowing user methods with the same name Fixes google#159 Fixes google#963
This file creates a problem:
Workaround:
If I rename the "Request" method to anything else, it generates error free code. I think it should work anyway though, seems weird that it breaks on a certain identifier.
The text was updated successfully, but these errors were encountered: