diff options
| author | Kathy Gray | 2014-02-07 18:49:43 +0000 |
|---|---|---|
| committer | Kathy Gray | 2014-02-07 18:49:43 +0000 |
| commit | 607d63750a39be92c097cbc202faf0daf9c8db53 (patch) | |
| tree | 9e0f3b61e474df9314fc942cea0e41216fcb0231 /src/test | |
| parent | 1222c8487cc7ffba63549c82ff3ae9f3cb7c2b78 (diff) | |
type checking switch/case expressions
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/pattern.sail | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/pattern.sail b/src/test/pattern.sail index e8fc1705..9a71d0e3 100644 --- a/src/test/pattern.sail +++ b/src/test/pattern.sail @@ -3,16 +3,16 @@ register nat n register nat x register nat y -function unit main _ = { +function nat main _ = { (* works - x and y are set to 42 *) n := 1; y := - (switch n { + ignore((switch n { case 0 -> { x := 21; x } case 1 -> { x := 42; x } case x -> { x := 99; x } - }); + })); (* doesn't work - main returns 1 instead of 99 *) n := 3; |
