mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
closes #6076
This commit is contained in:
@@ -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]())
|
||||
|
||||
Reference in New Issue
Block a user