From 7e261c67bfeab5931d0c396c89d6bc91c02ef2b4 Mon Sep 17 00:00:00 2001
From: Matt Wala <wala1@illinois.edu>
Date: Tue, 12 Sep 2017 21:28:19 -0500
Subject: [PATCH] Check that instruction ids are strings.

---
 loopy/check.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/loopy/check.py b/loopy/check.py
index 2ce9ffe0f..a8ec1ad35 100644
--- a/loopy/check.py
+++ b/loopy/check.py
@@ -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)
-- 
GitLab