diff options
Diffstat (limited to 'src/main/stanza/errors.stanza')
| -rw-r--r-- | src/main/stanza/errors.stanza | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/stanza/errors.stanza b/src/main/stanza/errors.stanza index fd3dfc2a..69073f9f 100644 --- a/src/main/stanza/errors.stanza +++ b/src/main/stanza/errors.stanza @@ -918,14 +918,14 @@ public defn check-width (c:Circuit) -> Circuit : (e:UIntValue) : match(width(e)) : (w:LongWidth) : - if max(to-long(1),to-long(num-bits(value(e)) - 1)) > width(w) : + if max(to-long(1),to-long(req-num-bits(value(e)) - 1)) > width(w) : add(errors,WidthTooSmall(info,to-string(value(e)))) (w) : add(errors,UninferredWidth(info)) check-width-w(info,width(e)) (e:SIntValue) : match(width(e)) : (w:LongWidth) : - if to-long(num-bits(value(e))) > width(w) : + if to-long(req-num-bits(value(e))) > width(w) : add(errors,WidthTooSmall(info,to-string(value(e)))) (w) : add(errors,UninferredWidth(info)) check-width-w(info,width(e)) |
