* Fixes #9844
This commit is contained in:
Clyybber 2019-05-09 22:58:41 +02:00 • committed by Andreas Rumpf
commit 6be9b98e35
2 changed files with 23 additions and 2 deletions

View file

@ -1,5 +1,6 @@
discard """
output: '''(10, (20, ))'''
output: '''(10, (20, ))
42'''
"""
import strutils, sequtils
@ -23,3 +24,16 @@ proc dosomething(): seq[TThing] =
result = @[TThing(data: 10, children: result)]
echo($dosomething()[0])
# bug #9844
proc f(v: int): int = v
type X = object
v: int
var x = X(v: 42)
x = X(v: f(x.v))
echo x.v