fixes #25
This commit is contained in:
parent
e38876efb6
commit
ecb3590102
2 changed files with 15 additions and 1 deletions
|
|
@ -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)]))
|
putIntoDest(p, d, e.typ, ropecg(p.module, "#reprStr($1)", [rdLoc(a)]))
|
||||||
of tySet:
|
of tySet:
|
||||||
putIntoDest(p, d, e.typ, ropecg(p.module, "#reprSet($1, $2)", [
|
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:
|
of tyOpenArray:
|
||||||
var b: TLoc
|
var b: TLoc
|
||||||
case a.t.kind
|
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'}))
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue