bynk.boundary.ambiguous_type
Error A value's type is declared, with different shapes, by more than one consumed context, so its fields cannot be read.
A context can export a record whose field has a type it does not export. Reading that field through a value you got from it needs the field's type, and if two contexts you consume each declare a type of that name with different shapes, the compiler cannot tell which is meant. Rename one of the two so a name stands for one shape across the contexts you consume.
Example
type Amount = { cents: Int }type Wrap = { inner: Amount }
// shop/other.bynktype Amount = { dollars: Int }
// shop/till.bynkconsumes shop.quotesconsumes shop.other
let w <- shop.quotes.wrap() Effect.pure(w.inner.cents) // ✗ which `Amount` is `inner`?
// shop/other.bynktype Price = { dollars: Int } // ✓ one name, one shapeIn the Book
See also
- Every code in its category, Boundaries, on the diagnostic index.
bynk explain bynk.boundary.ambiguous_typeshows the same from the installed toolchain, without a network.