Skip to content

Commit 19dcba5

Browse files
authored
updated docs after #16021 was closed (#16118)
2 parents 7817062 + a746a7f commit 19dcba5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/_docs/reference/new-types/match-types.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ following conditions are met:
8383
and these types are `=:=` to their corresponding type patterns in the match
8484
type
8585

86+
So you know, while the case body will be expected to have the type on the right-hand
87+
side of the corresponding match type case, that doesn't imply the match type argument
88+
is constrained. Using the example, the last case body must conform to X, but that
89+
doesn't constrain X to be AnyVal, and therefore a LeafElem[X] inside the body wouldn't
90+
reduce; it would remain stuck, and as such just an abstract type.
91+
8692
## Representation of Match Types
8793

8894
The internal representation of a match type

0 commit comments

Comments
 (0)