mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 19:52:36 +00:00
* Goodbye postInitProc * Give preInitProc its own scope Avoid any conflict between the variables introduced by preInitProc and initProc since both are codegen'd in the same function body. * Fix codegen for global var init in emulated TLS Fixes #8535 * Add test for #8535 * Keep a bogus stack frame around * Remove more dead code
17 lines
266 B
Nim
17 lines
266 B
Nim
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 isMainModule:
|
|
echo foo.index
|