Add a guard example for E0416

This commit is contained in:
Guillaume Gomez 2015-08-07 15:23:00 +02:00
parent 5aa6c155a3
commit c3d147eea6

View File

@ -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##"