summary refs log blame commit diff stats
path: root/tests/run/tcgbug.nim
blob: 417b909ae413e4f5b78970283701bcc80220f227 (plain) (tree)
1
2
3
4

                    
                   
   
















                     
              
 
discard """
  file: "tcgbug.nim"
  output: "success"
"""

type
  TObj = object
    x, y: int
  PObj = ref TObj

proc p(a: PObj) =
  a.x = 0

proc q(a: var PObj) =
  a.p()

var 
  a: PObj
new(a)
q(a)

echo "success"