summary refs log tree commit diff stats
path: root/tests/threads/t8535.nim
blob: e1b5a13692dfeb788c04a81522b058013754d496 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  output: "0"
"""

type
  CircAlloc* [Size: static[int] , T]  =  tuple
    baseArray           : array[Size,T]
    index               : uint16

type
  Job = object of RootObj

var foo {.threadvar.}: CircAlloc[1,Job]

when true:
  echo foo.index