bynk.parse.expected_base_type
Error Expected a base type.
After type Name = the parser found something that is not a record { … }, a sum starting with |, an enum or an opaque type, so it wanted a base type (Int, String, Bool, Float, Duration, Instant, Bytes or Decimal) to build on. The commonest cause is a sum written without its leading |. Another is naming an existing record or sum, as in type Id = Order, which a type declaration cannot do; for a distinct type, use opaque over a base type. The position is the first token after the =.
Example
type Shape = Circle | Square // ✗ a sum starts with `|`type Shape = | Circle | Square // ✓In the Book
See also
- The grammar rule it governs:
base_type. - Every code in its category, Parser, on the diagnostic index.
bynk explain bynk.parse.expected_base_typeshows the same from the installed toolchain, without a network.