summary refs log tree commit diff stats
path: root/tests/ccgbugs/t14160.nim
blob: be7088e29108feb1a3900eea46cead8ad510525f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
type
  TPassContext = object of RootObj
  PPassContext = ref TPassContext

  PCtx = ref object of TPassContext
    a: int

  ModuleGraph = object
    vm: RootRef

proc main() =
  var g = ModuleGraph(vm: new(Pctx))
  PCtx(g.vm) = nil #This generates invalid C code

main()