This commit is contained in:
Oscar Nihlgård 2018-06-30 09:16:46 +02:00 • committed by Andreas Rumpf
commit d146045ed5
2 changed files with 24 additions and 3 deletions

View file

@ -91,6 +91,21 @@ block:
result = size
doAssert f(4) == 4
# #6689
block:
static:
proc foo(): int = 0
var f: proc(): int
doAssert f.isNil
f = foo
doAssert(not f.isNil)
block:
static:
var x: ref ref int
new(x)
doAssert(not x.isNil)
# #7871
static:
type Obj = object
@ -119,4 +134,4 @@ static:
o.names = ""
o.pushName()
o.pushName()
doAssert o.names == "FOOBARFOOBAR"
doAssert o.names == "FOOBARFOOBAR"