fixes #833
This commit is contained in:
parent
896c96134f
commit
f2216b8e32
2 changed files with 13 additions and 0 deletions
|
|
@ -153,6 +153,9 @@ proc replaceTypeVarsN(cl: var TReplTypeVars, n: PNode): PNode =
|
||||||
discard
|
discard
|
||||||
of nkSym:
|
of nkSym:
|
||||||
result.sym = replaceTypeVarsS(cl, n.sym)
|
result.sym = replaceTypeVarsS(cl, n.sym)
|
||||||
|
if result.sym.typ.kind == tyEmpty:
|
||||||
|
# don't add the 'void' field
|
||||||
|
result = newNode(nkRecList, n.info)
|
||||||
of nkRecWhen:
|
of nkRecWhen:
|
||||||
var branch: PNode = nil # the branch to take
|
var branch: PNode = nil # the branch to take
|
||||||
for i in countup(0, sonsLen(n) - 1):
|
for i in countup(0, sonsLen(n) - 1):
|
||||||
|
|
|
||||||
|
|
@ -21,3 +21,13 @@ q(a)
|
||||||
|
|
||||||
echo "success"
|
echo "success"
|
||||||
|
|
||||||
|
|
||||||
|
# bug #833
|
||||||
|
|
||||||
|
type
|
||||||
|
PFuture*[T] = ref object
|
||||||
|
value*: T
|
||||||
|
finished*: bool
|
||||||
|
cb: proc (future: PFuture[T]) {.closure.}
|
||||||
|
|
||||||
|
var k = PFuture[void]()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue