diff options
Diffstat (limited to 'tests/run/globalaux.nim')
-rw-r--r-- | tests/run/globalaux.nim | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/run/globalaux.nim b/tests/run/globalaux.nim deleted file mode 100644 index 5f6f72721..000000000 --- a/tests/run/globalaux.nim +++ /dev/null @@ -1,15 +0,0 @@ -type - TObj*[T] = object - val*: T - -var - totalGlobals* = 0 - -proc makeObj[T](x: T): TObj[T] = - totalGlobals += 1 - result.val = x - -proc globalInstance*[T]: var TObj[T] = - var g {.global.} = when T is int: makeObj(10) else: makeObj("hello") - result = g - |