fix some trivial errors in the test suite and some more regressions caused by tyTypeDesc[tyNone]
This commit is contained in:
parent
4d3846e26b
commit
cda92048ba
10 changed files with 68 additions and 37 deletions
15
tests/global/globalaux.nim
Normal file
15
tests/global/globalaux.nim
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue