Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions lib/Checker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,9 @@ and check' env t e =
check_array_index env e3;
c TUnit

| EBufBlit (b1, i1, b2, i2, len) ->
let t1, c1 = infer_buffer env b1 in
check_mut env "blit" c1;
check env (TBuf (t1, false)) b2;
| EBufBlit (b1 (* source *), i1, b2 (* destination *), i2, len) ->
let t1, _ = infer_buffer env b1 in (* source can be const *)
check env (TBuf (t1, false)) b2; (* destination must be non-const *)
check_array_index env i1;
check_array_index env i2;
check_array_index env len;
Expand Down Expand Up @@ -713,10 +712,9 @@ and infer' env e =
check_array_index env e3;
TUnit

| EBufBlit (b1, i1, b2, i2, len) ->
let t1, c = infer_buffer env b1 in
check_mut env "blit" c;
check env (TBuf (t1, c)) b2;
| EBufBlit (b1 (* source *), i1, b2 (* destination *), i2, len) ->
let t1, _ = infer_buffer env b1 in (* source can be const *)
check env (TBuf (t1, false)) b2; (* destination must be non-const *)
check_array_index env i1;
check_array_index env i2;
check_array_index env len;
Expand Down