@@ -769,7 +769,7 @@ let rec check_instr (c : context) (e : instr) (s : infer_resulttype) : infer_ins
769769 require (i < Lib.List32. length fts) e.at
770770 (" unknown field " ^ I32. to_string_u i);
771771 let FieldT (mut, st) = Lib.List32. nth fts i in
772- require (mut == Var ) e.at " field is immutable" ;
772+ require (mut == Var ) e.at " immutable field " ;
773773 let t = unpacked_storagetype st in
774774 [RefT (Null , UseHT (Def (type_ c x))); t] --> [] , []
775775
@@ -811,7 +811,7 @@ let rec check_instr (c : context) (e : instr) (s : infer_resulttype) : infer_ins
811811
812812 | ArraySet x ->
813813 let FieldT (mut, st) = array_type c x in
814- require (mut == Var ) e.at " array is immutable" ;
814+ require (mut == Var ) e.at " immutable array " ;
815815 let t = unpacked_storagetype st in
816816 [RefT (Null , UseHT (Def (type_ c x))); NumT I32T ; t] --> [] , []
817817
@@ -821,19 +821,19 @@ let rec check_instr (c : context) (e : instr) (s : infer_resulttype) : infer_ins
821821 | ArrayCopy (x , y ) ->
822822 let FieldT (mutd, std) = array_type c x in
823823 let FieldT (_muts, sts) = array_type c y in
824- require (mutd = Var ) e.at " array is immutable" ;
824+ require (mutd = Var ) e.at " immutable array " ;
825825 require (match_storagetype c.types sts std) e.at " array types do not match" ;
826826 [RefT (Null , UseHT (Def (type_ c x))); NumT I32T ; RefT (Null , UseHT (Def (type_ c y))); NumT I32T ; NumT I32T ] --> [] , []
827827
828828 | ArrayFill x ->
829829 let FieldT (mut, st) = array_type c x in
830- require (mut = Var ) e.at " array is immutable" ;
830+ require (mut = Var ) e.at " immutable array " ;
831831 let t = unpacked_storagetype st in
832832 [RefT (Null , UseHT (Def (type_ c x))); NumT I32T ; t; NumT I32T ] --> [] , []
833833
834834 | ArrayInitData (x , y ) ->
835835 let FieldT (mut, st) = array_type c x in
836- require (mut = Var ) e.at " array is immutable" ;
836+ require (mut = Var ) e.at " immutable array " ;
837837 let () = data c y in
838838 let t = unpacked_storagetype st in
839839 require (is_numtype t || is_vectype t) x.at
@@ -842,7 +842,7 @@ let rec check_instr (c : context) (e : instr) (s : infer_resulttype) : infer_ins
842842
843843 | ArrayInitElem (x , y ) ->
844844 let FieldT (mut, st) = array_type c x in
845- require (mut = Var ) e.at " array is immutable" ;
845+ require (mut = Var ) e.at " immutable array " ;
846846 let rt = elem c y in
847847 require (match_valtype c.types (RefT rt) (unpacked_storagetype st)) x.at
848848 (" type mismatch: element segment's type " ^ string_of_reftype rt ^
0 commit comments