This commit is contained in:
Araq
2019-05-22 15:42:34 +02:00
parent 279df834ba
commit 85ac4bfff6

View File

@@ -15,6 +15,7 @@ static: const
static: literal
static: constant folding
static: static string
foo1
'''
"""
@@ -174,3 +175,26 @@ block tstaticoverload:
foo("literal")
foo("constant" & " " & "folding")
foo(staticString("static string"))
# bug #6076
type A[T] = object
proc regr(a: A[void]) = echo "foo1"
proc regr[T](a: A[T]) = doAssert(false)
regr(A[void]())
type Foo[T] = object
proc regr[T](p: Foo[T]): seq[T] =
discard
proc regr(p: Foo[void]): seq[int] =
discard
discard regr(Foo[int]())
discard regr(Foo[void]())