bynk.types.duplicate_example
Error A refinement carries more than one @example.
@example gives Val the one value to use for a Matches or IsoDate refinement, which it cannot invent. A second @example would leave two candidates and no rule for choosing, so a refinement takes at most one. Keep the one you want. An example that does not satisfy the refinement is bynk.types.example_violates.
Example
type Code = String where Matches("[A-Z]{3}") @example("ABC") @example("XYZ") // ✗ a second example
type Code = String where Matches("[A-Z]{3}") @example("ABC") // ✓In the Book
See also
- The grammar rule it governs:
refinement. - Every code in its category, Type checking, on the diagnostic index.
bynk explain bynk.types.duplicate_exampleshows the same from the installed toolchain, without a network.