mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 11:12:37 +00:00
* fixes #18645; C Compiler error when initializing {.global.} with a block: * arguably cleaner solution Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com> Co-authored-by: Araq <rumpf_a@web.de>
19 lines
212 B
Nim
19 lines
212 B
Nim
discard """
|
|
matrix: "--gc:arc; --gc:refc"
|
|
output: '''
|
|
1
|
|
2
|
|
3
|
|
'''
|
|
"""
|
|
|
|
proc bitTypeIdUnion() =
|
|
var bitId {.global.} = block:
|
|
0
|
|
inc bitId
|
|
echo bitId
|
|
|
|
bitTypeIdUnion()
|
|
bitTypeIdUnion()
|
|
bitTypeIdUnion()
|