Add a guard example for E0416
This commit is contained in:
parent
5aa6c155a3
commit
c3d147eea6
@ -494,6 +494,15 @@ match (1, 2) {
|
||||
(x, y) => {} // ok!
|
||||
}
|
||||
```
|
||||
|
||||
Or maybe did you mean to unify? Consider using a guard:
|
||||
|
||||
```
|
||||
match (A, B, C) {
|
||||
(x, x2, see) if x == x2 => { /* A and B are equal, do one thing */ }
|
||||
(y, z, see) => { /* A and B unequal; do another thing */ }
|
||||
}
|
||||
```
|
||||
"##,
|
||||
|
||||
E0417: r##"
|
||||
|
Loading…
x
Reference in New Issue
Block a user