diff options
| author | Kathy Gray | 2014-04-15 11:39:34 +0100 |
|---|---|---|
| committer | Kathy Gray | 2014-04-15 11:39:34 +0100 |
| commit | 407084d0a3a5bf527430e338bd085062dc78f8ae (patch) | |
| tree | 96b5f2f161140a0e192ac874d71f9f1257d81d3f /src/test | |
| parent | b6c01ea4e538cdd3d92f6ca2543e8ea95d542344 (diff) | |
Use type information in vector concatenation pattern matching in interpreter.
Does not properly bind variables (i.e. in the pattern 0b01:(bit[3]) a: 0b0001 subsequent uses of a will not be bound in the interpreter, though they are in the type checker), so until bug is fixed, treat all such identifiers as _
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/pattern.sail | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/pattern.sail b/src/test/pattern.sail index 7bbfebf9..cabe7dad 100644 --- a/src/test/pattern.sail +++ b/src/test/pattern.sail @@ -23,6 +23,11 @@ function nat main _ = { case 32 -> { x:= 128; } }; + switch 0b010101 { + case (0b01:(bit[1]) _:0b101) -> n:= 42 + case _ -> n:=0 + }; + n := 3; switch n { case 0 -> { 21 } |
