fix some trivial errors in the test suite and some more regressions caused by tyTypeDesc[tyNone]

This commit is contained in:
Zahary Karadjov 2014-02-18 02:46:14 +02:00
commit cda92048ba
10 changed files with 68 additions and 37 deletions

View 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