This commit is contained in:
Kartik K. Agaram 2014-11-01 02:17:23 -07:00
parent 990963b470
commit 0909f30c47
1 changed files with 2 additions and 2 deletions

4
mu.arc
View File

@ -220,10 +220,10 @@
basetype typeinfo.operand
idx (v field-offset))
(when (pos 'deref metadata.operand)
(assert basetype!address "base @operand requests deref, but its type is not an address")
(assert basetype!address "@operand requests deref, but it's not an address of a record")
(= basetype (types* basetype!elem)))
(assert basetype!record "get on non-record @operand")
(assert (< -1 idx (len basetype!elems)) "@idx is out of bounds of @operand")
(assert (< -1 idx (len basetype!elems)) "@idx is out of bounds of record @operand")
(list (+ base (apply + (map sz (firstn idx basetype!elems))))
basetype!elems.idx)))