/lib/core/

name='h' onchange='this.form.submit();'> This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log tree commit diff stats
path: root/tests/ccgbugs/tdeepcopy_addr_rval.nim
blob: 4a0b0deaac183b3c5ba20c32f0af4d1336bde34d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
discard """
  matrix: "--mm:refc; --mm:orc --deepcopy:on"
  output: "3"
"""

# issue 5166

type
  Test = ref object
    x: int

let x = Test(x: 3)
let p = cast[pointer](x)

var v: Test
deepCopy(v, cast[Test](p))
echo v.x