Commit 789afd1b by Zachary Snow

error on size cast with non-integer size

parent 1f03c64e
...@@ -181,7 +181,8 @@ castFnName size signed = ...@@ -181,7 +181,8 @@ castFnName size signed =
Number n -> Number n ->
case numberToInteger n of case numberToInteger n of
Just v -> show v Just v -> show v
_ -> shortHash size _ -> error $ "size cast width " ++ show n
++ " is not an integer"
_ -> shortHash size _ -> shortHash size
suffix = if signed then "_signed" else "" suffix = if signed then "_signed" else ""
......
// pattern: size cast width 1'bx is not an integer
module top;
initial $display((1'bx)'(2));
endmodule
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