Skip to content
Snippets Groups Projects
Commit f8b8a763 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Fix error msg for type mismatch in multiple assignment

parent 2c77711a
No related branches found
No related tags found
No related merge requests found
...@@ -382,10 +382,11 @@ class CTarget(TargetBase): ...@@ -382,10 +382,11 @@ class CTarget(TargetBase):
mangle_result.target_name, mangle_result.target_name,
mangle_result.arg_dtypes)) mangle_result.arg_dtypes))
for a, tgt_dtype in zip(insn.assignees[1:], mangle_result.result_dtypes[1:]): for i, (a, tgt_dtype) in enumerate(
zip(insn.assignees[1:], mangle_result.result_dtypes[1:])):
if tgt_dtype != ecm.infer_type(a): if tgt_dtype != ecm.infer_type(a):
raise LoopyError("type mismatch in %d'th (1-based) left-hand " raise LoopyError("type mismatch in %d'th (1-based) left-hand "
"side of instruction '%s'" % (insn.id)) "side of instruction '%s'" % (i+1, insn.id))
str_parameters.append( str_parameters.append(
"&(%s)" % ecm(a, PREC_NONE, "&(%s)" % ecm(a, PREC_NONE,
dtype_to_type_context(self, tgt_dtype), dtype_to_type_context(self, tgt_dtype),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment