diff options
| author | azidar | 2016-01-17 15:52:09 -0800 |
|---|---|---|
| committer | azidar | 2016-01-17 15:52:09 -0800 |
| commit | 263559753a0584ca7896607e643d9e6348811dff (patch) | |
| tree | cfb8059ff0016edf47df6a1fab2cfd8975da67cf /src/main/stanza/errors.stanza | |
| parent | 6e898b3cecdc3a6f65e58930beb13857c7e36c31 (diff) | |
Forgot to add the changes
Diffstat (limited to 'src/main/stanza/errors.stanza')
| -rw-r--r-- | src/main/stanza/errors.stanza | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/stanza/errors.stanza b/src/main/stanza/errors.stanza index fb754406..97660b46 100644 --- a/src/main/stanza/errors.stanza +++ b/src/main/stanza/errors.stanza @@ -391,6 +391,10 @@ defn IndexOnNonVector (info:FileInfo) : PassException $ string-join $ [info ": [module " mname "] Index illegal on non-vector type."] +defn AccessIndexNotUInt (info:FileInfo) : + PassException $ string-join $ + [info ": [module " mname "] Access index must be a UInt type."] + defn IndexNotUInt (info:FileInfo) : PassException $ string-join $ [info ": [module " mname "] Index is not of UIntType."] @@ -549,6 +553,9 @@ public defn check-types (c:Circuit) -> Circuit : match(type(exp(e))) : (t:VectorType) : false (t) : add(errors,IndexOnNonVector(info)) + match(type(index(e))) : + (t:UIntType) : false + (t) : add(errors,AccessIndexNotUInt(info)) (e:DoPrim) : check-types-primop(e,errors,info) (e:UIntValue|SIntValue) : false e |
