mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 14:23:45 +00:00
fixes #25441; fixes #7355
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
(cherry picked from commit 81610095e6)
19 lines
367 B
Nim
19 lines
367 B
Nim
block: # bug #25441
|
|
func foo[T](x: T, y: int) =
|
|
discard
|
|
|
|
foo[void](10)
|
|
|
|
block:
|
|
func foo[T: void|float](e: openArray[int], x: T, y: int) =
|
|
discard
|
|
|
|
var x: seq[int]
|
|
foo[void] x, 2
|
|
|
|
block: # bug #7355
|
|
proc gen[A: void, T: void|int](a: A, b: T) = discard
|
|
|
|
gen[void, void]() # Works
|
|
gen[void, int] 0 # Crash
|
|
gen[void, int](b = 0) # Crash |