summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThomas Bauereiss2020-03-28 13:28:52 +0000
committerThomas Bauereiss2020-04-10 13:22:11 +0100
commit319c382fe396886fd2b1bd8295c55aa0d9dd0acd (patch)
tree9ee2056a3b5109848d3a3d18c156daed4bfc39f9 /test
parent550db27f8c27e03ecc4defc804c8f360af64fbd6 (diff)
Make bounds check for vector subrange assignments stricter
Check that indices are within bounds, not just in the right (increasing/decreasing) order.
Diffstat (limited to 'test')
-rw-r--r--test/typecheck/pass/reg_32_64/v2.expect10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/typecheck/pass/reg_32_64/v2.expect b/test/typecheck/pass/reg_32_64/v2.expect
index 90166904..8854282d 100644
--- a/test/typecheck/pass/reg_32_64/v2.expect
+++ b/test/typecheck/pass/reg_32_64/v2.expect
@@ -1,13 +1,11 @@
Type error:
-[reg_32_64/v2.sail]:21:18-22
+[reg_32_64/v2.sail]:21:2-15
21 | (*R)['d .. 0] = data
-  | ^--^
-  | Tried performing type coercion from bitvector('d, dec) to bitvector((('d - 0) + 1), dec) on data
-  | Coercion failed because:
-  | Mismatched argument types in subtype check
+  | ^-----------^
+  | Bounds check failed for l-expression: ((0 <= 0 & 0 <= 'd) & 'd < 64)
 | This error was caused by:
 | [reg_32_64/v2.sail]:21:2-15
 | 21 | (*R)['d .. 0] = data
 |  | ^-----------^
-  |  | Mismatched argument types in subtype check
+  |  | Bounds check failed for l-expression: ((0 <= 0 & 0 <= 'd) & 'd < 64)
 |