diff options
author | Juan Carlos <juancarlospaco@gmail.com> | 2023-06-07 19:09:09 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-08 00:09:09 +0200 |
commit | ea91cfb3050bac5c808ed8ab08e12cd33f1dc8ff (patch) | |
tree | 28e8982bf3a280811b207f505bb57dc80faa41fe | |
parent | d29237b3c7c63586b06d788959e46189ff413245 (diff) | |
download | Nim-ea91cfb3050bac5c808ed8ab08e12cd33f1dc8ff.tar.gz |
Improve compiler messages (#22040)
* Improve compiler messages
-rw-r--r-- | compiler/semtypes.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 503e2fde8..14ad72fca 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -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])) |