This commit is contained in:
Araq
2011-04-05 00:55:32 +02:00
parent e38876efb6
commit ecb3590102
2 changed files with 15 additions and 1 deletions

View File

@@ -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

View 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'}))