Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/docs/manual/latest/polymorphic-variant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ let other = [#Green]
let all = Belt.Array.concat(colors, other)
```

As you can see in the example above, the type checker doesn't really care about the fact that `color` is not annotated as an `array<rgb>` type.
As you can see in the example above, the type checker doesn't really care about the fact that `other` is not annotated as an `array<rgb>` type.

As soon as it hits the first constraint (`Belt.Array.concat`), it will try to check if the structural types of `colors` and `other` unify into one poly variant type. If there's a mismatch, you will get an error on the `Belt.Array.concat` call.

Expand Down