Commit 150b7f2a by Zachary Snow

enum item conflict raises scoped error

parent fd64d4e3
...@@ -94,7 +94,7 @@ insertEnumItems itemType items = ...@@ -94,7 +94,7 @@ insertEnumItems itemType items =
-- check for obviously duplicate values -- check for obviously duplicate values
if noDuplicates if noDuplicates
then zipWithM_ insertEnumItem keys vals then zipWithM_ insertEnumItem keys vals
else error $ "enum conversion has duplicate vals: " else scopedErrorM $ "enum conversion has duplicate vals: "
++ show (zip keys vals) ++ show (zip keys vals)
where where
insertEnumItem :: Identifier -> Expr -> SC () insertEnumItem :: Identifier -> Expr -> SC ()
......
// pattern: enum conversion has duplicate vals // pattern: enum conversion has duplicate vals
// location: enum_conflict.sv:4:5
module top; module top;
typedef enum { typedef enum {
A = 0, A = 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment