mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 11:12:37 +00:00
fixes #25
This commit is contained in:
@@ -1038,7 +1038,7 @@ proc genRepr(p: BProc, e: PNode, d: var TLoc) =
|
||||
putIntoDest(p, d, e.typ, ropecg(p.module, "#reprStr($1)", [rdLoc(a)]))
|
||||
of tySet:
|
||||
putIntoDest(p, d, e.typ, ropecg(p.module, "#reprSet($1, $2)", [
|
||||
rdLoc(a), genTypeInfo(p.module, t)]))
|
||||
addrLoc(a), genTypeInfo(p.module, t)]))
|
||||
of tyOpenArray:
|
||||
var b: TLoc
|
||||
case a.t.kind
|
||||
|
||||
14
tests/accept/run/trepr.nim
Normal file
14
tests/accept/run/trepr.nim
Normal file
@@ -0,0 +1,14 @@
|
||||
discard """
|
||||
file: "trepr.nim"
|
||||
output: "{a, b}{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}"
|
||||
"""
|
||||
|
||||
type
|
||||
TEnum = enum
|
||||
a, b
|
||||
|
||||
var val = {a, b}
|
||||
stdout.write(repr(val))
|
||||
stdout.writeln(repr({'a'..'z', 'A'..'Z'}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user