bynk.service.duplicate_call_handler
Error A service declares more than one on call handler; it has exactly one.
A service with no from clause is a call service with one entry: exactly one on call handler, which another context calls by the service's name (payment.authorise(…)) and a test addresses as svc.call(…). A second would never run, since only one of the two can answer the call. To offer a second operation, declare a second service.
Example
service greet { on call(name: String) -> Effect[String] by Caller { … } on call(name: String) -> Effect[String] by Caller { … } // ✗ a second `on call`}
service greet { on call(name: String) -> Effect[String] by Caller { … } // ✓ one handler}
service farewell { // ✓ a second operation is a second service on call(name: String) -> Effect[String] by Caller { … }}In the Book
See also
- The grammar rule it governs:
service_decl. - Every code in its category, Services, on the diagnostic index.
bynk explain bynk.service.duplicate_call_handlershows the same from the installed toolchain, without a network.