parent
947ecd1257
commit
191c388792
1 changed files with 2 additions and 2 deletions
|
|
@ -670,7 +670,7 @@ proc semRecordCase(c: PContext, n: PNode, check: var IntSet, pos: var int,
|
||||||
case typ.kind
|
case typ.kind
|
||||||
of shouldChckCovered:
|
of shouldChckCovered:
|
||||||
chckCovered = true
|
chckCovered = true
|
||||||
of tyFloat..tyFloat128, tyString, tyError:
|
of tyFloat..tyFloat128, tyError:
|
||||||
discard
|
discard
|
||||||
of tyRange:
|
of tyRange:
|
||||||
if skipTypes(typ[0], abstractInst).kind in shouldChckCovered:
|
if skipTypes(typ[0], abstractInst).kind in shouldChckCovered:
|
||||||
|
|
@ -678,7 +678,7 @@ proc semRecordCase(c: PContext, n: PNode, check: var IntSet, pos: var int,
|
||||||
of tyForward:
|
of tyForward:
|
||||||
errorUndeclaredIdentifier(c, n[0].info, typ.sym.name.s)
|
errorUndeclaredIdentifier(c, n[0].info, typ.sym.name.s)
|
||||||
elif not isOrdinalType(typ):
|
elif not isOrdinalType(typ):
|
||||||
localError(c.config, n[0].info, "selector must be of an ordinal type, float or string")
|
localError(c.config, n[0].info, "selector must be of an ordinal type, float")
|
||||||
if firstOrd(c.config, typ) != 0:
|
if firstOrd(c.config, typ) != 0:
|
||||||
localError(c.config, n.info, "low(" & $a[0].sym.name.s &
|
localError(c.config, n.info, "low(" & $a[0].sym.name.s &
|
||||||
") must be 0 for discriminant")
|
") must be 0 for discriminant")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue