mirror of
https://github.com/anoma/juvix.git
synced 2024-12-03 09:41:10 +03:00
95275ca5c1
* Closes #3007 * Depends on #3101 * Detects side conditions which are `true` (removes the condition) or `false` (removes the branch).
12 lines
223 B
Plaintext
12 lines
223 B
Plaintext
-- Non-exhaustive pattern matching with false side conditions
|
|
module test012;
|
|
|
|
import Stdlib.Prelude open;
|
|
|
|
f (x : List Nat) : Nat :=
|
|
case x of
|
|
| nil := 0
|
|
| x :: _ if false := x;
|
|
|
|
main : Nat := f (1 :: 2 :: nil);
|