mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +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.
18 lines
258 B
Nim
18 lines
258 B
Nim
discard """
|
|
errormsg: "'bar' doesn't have a concrete type, due to unspecified generic parameters."
|
|
line: 16
|
|
"""
|
|
|
|
proc foo[T]() =
|
|
var y1 = foo[string]
|
|
var y2 = foo[T]
|
|
|
|
proc bar[T]() =
|
|
let x = 0
|
|
|
|
let good1 = foo[int]
|
|
let good2 = bar[int]
|
|
|
|
let err = bar
|
|
|