diff options
author | Neelesh Chandola <neelesh.chandola@outlook.com> | 2018-12-11 10:34:10 +0530 |
---|---|---|
committer | Neelesh Chandola <neelesh.chandola@outlook.com> | 2018-12-11 10:34:10 +0530 |
commit | 47c38cb98e6cde435fd38565cd374050955610eb (patch) | |
tree | cc23c23312301d33dea259434a1f0a792f207f22 | |
parent | e44641b6cb025b689298584418e91844b1ac5a4a (diff) | |
download | Nim-47c38cb98e6cde435fd38565cd374050955610eb.tar.gz |
Better fix
-rw-r--r-- | compiler/semtypes.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 4cc759e52..eed82adeb 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -100,9 +100,9 @@ proc semEnum(c: PContext, n: PNode, prev: PType): PType = of tyString, tyCString: strVal = v x = counter - of tyFloat..tyFloat128: - localError(c.config, v.info, errOrdinalTypeExpected) else: + if not isOrdinalType(v.typ): + localError(c.config, v.info, errOrdinalTypeExpected) x = getOrdValue(v) if i != 1: if x != counter: incl(result.flags, tfEnumHasHoles) |