diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/mono/castreq.sail | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/mono/castreq.sail b/test/mono/castreq.sail index 5b155aa9..553cf2b4 100644 --- a/test/mono/castreq.sail +++ b/test/mono/castreq.sail @@ -63,7 +63,7 @@ function assign(x) = { r } -/* Adding casts for top-level pattern matches is not yet supported +/* Adding casts for top-level pattern matches */ val foo2 : forall 'm 'n, 'm in {8,16} & 'n in {32,64}. (atom('n), bits('m)) -> bits('n) effect pure @@ -74,15 +74,16 @@ and foo2(64,x) = let y : bits(16) = extzv(x) in let z = y@y@y@y in let dfsf = 4 in z +/* Casting an argument isn't supported yet val bar2 : forall 'n, 'n in {8,16}. (atom('n),bits('n)) -> unit effect pure function bar2(8,x) = use(x@x) and bar2(16,x) = use(x) - */ + val run : unit -> unit effect {escape,undef} function run () = { @@ -96,4 +97,6 @@ function run () = { assert((assign(0x1234) : bits(32)) == 0x12341234); assert((assign(0x12) : bits(64)) == 0x0012001200120012); assert((assign(0x1234) : bits(64)) == 0x1234123412341234); + assert(foo2(32,0x12) == 0x00120012); + assert(foo2(64,0x12) == 0x0012001200120012); }
\ No newline at end of file |
