parent
4e0e706cfe
commit
e26545797e
3 changed files with 12 additions and 2 deletions
|
|
@ -943,7 +943,7 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
|
||||||
of nkCharLit: put(g, tkCharLit, atom(g, n))
|
of nkCharLit: put(g, tkCharLit, atom(g, n))
|
||||||
of nkNilLit: put(g, tkNil, atom(g, n)) # complex expressions
|
of nkNilLit: put(g, tkNil, atom(g, n)) # complex expressions
|
||||||
of nkCall, nkConv, nkDotCall, nkPattern, nkObjConstr:
|
of nkCall, nkConv, nkDotCall, nkPattern, nkObjConstr:
|
||||||
if n.len > 0 and isBracket(n[0]):
|
if renderIds notin g.flags and n.len > 0 and isBracket(n[0]):
|
||||||
gsub(g, n, 1)
|
gsub(g, n, 1)
|
||||||
put(g, tkBracketLe, "[")
|
put(g, tkBracketLe, "[")
|
||||||
gcomma(g, n, 2)
|
gcomma(g, n, 2)
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,7 @@ proc replaceTypeVarsN(cl: var TReplTypeVars, n: PNode; start=0): PNode =
|
||||||
case n.kind
|
case n.kind
|
||||||
of nkNone..pred(nkSym), succ(nkSym)..nkNilLit:
|
of nkNone..pred(nkSym), succ(nkSym)..nkNilLit:
|
||||||
discard
|
discard
|
||||||
|
of nkOpenSymChoice, nkClosedSymChoice: result = n
|
||||||
of nkSym:
|
of nkSym:
|
||||||
result.sym = replaceTypeVarsS(cl, n.sym)
|
result.sym = replaceTypeVarsS(cl, n.sym)
|
||||||
if result.sym.typ.kind == tyVoid:
|
if result.sym.typ.kind == tyVoid:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
output: ""
|
output: "@[@[], @[], @[], @[], @[]]"
|
||||||
"""
|
"""
|
||||||
import sugar
|
import sugar
|
||||||
import macros
|
import macros
|
||||||
|
|
@ -26,3 +26,12 @@ block distinctBase:
|
||||||
Uint[bits: static[int]] = distinct uintImpl(bits)
|
Uint[bits: static[int]] = distinct uintImpl(bits)
|
||||||
|
|
||||||
doAssert Uint[128].distinctBase is UintImpl[uint64]
|
doAssert Uint[128].distinctBase is UintImpl[uint64]
|
||||||
|
|
||||||
|
# bug #7816
|
||||||
|
import sequtils
|
||||||
|
|
||||||
|
proc tester[T](x: T) =
|
||||||
|
let test = toSeq(0..4).map(i => newSeq[int]())
|
||||||
|
echo test
|
||||||
|
|
||||||
|
tester(1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue