Skip to content

Commit

Permalink
fixes #25
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Apr 4, 2011
1 parent 90ea792 commit 3562375
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rod/ccgexprs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions tests/accept/run/trepr.nim
Original file line number Diff line number Diff line change
@@ -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'}))


0 comments on commit 3562375

Please sign in to comment.