-
Notifications
You must be signed in to change notification settings - Fork 34
Description
The following will not work due to close() being replaced by the node-capnp implementation:
interface DirectionControllableShutter {
open @0 ();
close @1 ();
stop @2 ();
}this.controller.getDirectionControllableShutter(id)
.then((result) => result.object.close())
.then((result) => { /* ... */ })I'm aware that this is by design, but would raise an issue nevertheless because the capnp compiler allows methods to be named 'close'. As such, I'd expect them to be callable, even if it requires a language-specific workaround (which might also be required when naming a method after a language's reserved word.)
If you have a suggestion for a clean and generic workaround I'd be happy to implement it and submit a pull request. Ideally, this should be done without introducing an edge-case.
A quick and simple solution would be to detect clashes and resolve them by appending an underscore to the method name, so that the above would say .then((result) => result.object.close_()). I think that this is bad, because an edge-case is introduced which must be documented and communicated to the user.
Cheers and a happy new year, Oliver