Skip to content
Snippets Groups Projects
Commit 7e261c67 authored by Matt Wala's avatar Matt Wala
Browse files

Check that instruction ids are strings.

parent bb6013e9
No related branches found
No related tags found
No related merge requests found
......@@ -100,6 +100,8 @@ def check_for_duplicate_insn_ids(knl):
insn_ids = set()
for insn in knl.instructions:
if not isinstance(insn.id, str):
raise LoopyError("instruction id %r is not a string" % insn.id)
if insn.id in insn_ids:
raise LoopyError("duplicate instruction id: '%s'" % insn.id)
insn_ids.add(insn.id)
......
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