summary refs log blame commit diff stats
path: root/tests/js/tobjfieldbyvar.nim
blob: 91a3c1315e297042f0ede1f388a8dbc410024532 (plain) (tree)



















                         
discard """
  output: '''5
'''
"""

# bug #2798

type Inner = object
  value: int

type Outer = object
  i: Inner

proc test(i: var Inner) =
  i.value += 5

var o: Outer
test(o.i)

echo o.i.value