diff options
author | Araq <rumpf_a@web.de> | 2019-05-22 15:42:34 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-05-22 15:42:34 +0200 |
commit | 85ac4bfff6ab9a615a8b24f0cf7543178a2d591f (patch) | |
tree | b10d25b99cdc6fec1d36bf3152c1e56da5b82318 /tests/overload/toverload_various.nim | |
parent | 279df834bae8b6972af6cbcbdd57c1d53e1df9c7 (diff) | |
download | Nim-85ac4bfff6ab9a615a8b24f0cf7543178a2d591f.tar.gz |
closes #6076
Diffstat (limited to 'tests/overload/toverload_various.nim')
-rw-r--r-- | tests/overload/toverload_various.nim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/overload/toverload_various.nim b/tests/overload/toverload_various.nim index 4c17b6031..c4f8ecbf8 100644 --- a/tests/overload/toverload_various.nim +++ b/tests/overload/toverload_various.nim @@ -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]()) |