summary refs log tree commit diff stats
path: root/tests/assign/toverload_asgn2.nim
blob: 1104be92b537f479a3ce78ba43f1797b5e162f37 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
discard """
  output: '''i value 88
2aa'''
  disabled: "true"
"""

import moverload_asgn2

proc passAround(i: int): Concrete =
  echo "i value ", i
  result = Concrete(a: "aa", b: "bb", rc: 0)

proc main =
  let
    i = 88
    v = passAround(i)
    z = v.a
  var
    x: Concrete
  x = v
  echo x.rc, z # 2aa

main()