mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
This commit returns to a bit less strict checking of the number of macro arguments, because some old immediate macros rely on a behavior where even the arity of the macro is not being checked. It may be better if such macros are just declared to use varargs[expr], but this remains for another day.
21 lines
300 B
Nim
21 lines
300 B
Nim
discard """
|
|
errormsg: "type mismatch: got (proc [*missing parameters*](x: int) | proc (x: string){.gcsafe, locks: 0.})"
|
|
line: 19
|
|
"""
|
|
|
|
type
|
|
TGeneric[T] = object
|
|
x: int
|
|
|
|
proc foo[B](x: int) =
|
|
echo "foo1"
|
|
|
|
proc foo(x: string) =
|
|
echo "foo2"
|
|
|
|
proc bar(x: proc (x: int)) =
|
|
echo "bar"
|
|
|
|
bar foo
|
|
|