Skip to content

Commit

Permalink
Improve compiler messages (#22040)
Browse files Browse the repository at this point in the history
* Improve compiler messages
  • Loading branch information
juancarlospaco committed Jun 7, 2023
1 parent d29237b commit ea91cfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/semtypes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ proc semRangeAux(c: PContext, n: PNode, prev: PType): PType =

elif not isOrdinalType(rangeT[0]) and rangeT[0].kind notin {tyFloat..tyFloat128} or
rangeT[0].kind == tyBool:
localError(c.config, n.info, "ordinal or float type expected")
localError(c.config, n.info, "ordinal or float type expected, but got " & typeToString(rangeT[0]))
elif enumHasHoles(rangeT[0]):
localError(c.config, n.info, "enum '$1' has holes" % typeToString(rangeT[0]))

Expand Down

0 comments on commit ea91cfb

Please sign in to comment.