bynk.resolve.duplicate_provider
Error A capability is provided more than once.
provides Clock = … is the one implementation a context supplies for Clock, and a handler that is given Clock is given that one. Two providers for the same capability leave it nothing to choose between, so the second is refused. Delete the one you do not want, or merge them into one provider. Declaring the capability itself twice is bynk.resolve.duplicate_capability.
Example
provides Clock = FixedClock { … }provides Clock = OtherClock { … } // ✗ `Clock` already has a provider
provides Clock = FixedClock { … }provides Calendar = FixedCalendar { … } // ✓ one provider for each capabilityIn the Book
See also
- The grammar rule it governs:
provider_decl. - Every code in its category, Resolution, on the diagnostic index.
bynk explain bynk.resolve.duplicate_providershows the same from the installed toolchain, without a network.