You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
templatefooImpl() =discardprocfoo[T]() =whendeclared(fooImpl):
fooImpl()
else:
{.error: "foo is not implemented for this target".}
foo[int]()
Current Output
test.nim(10, 4) template/generic instantiation of `foo` from here
test.nim(5, 17) Error: identifier expected, but got:
discard
Additional Information
Doesn't happen if the proc is not a generic.
$ nim -v
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-01-05
Copyright (c) 2006-2020 by Andreas Rumpf
git hash: 2c2baa9fad1d144c42baf30ed004decdf8bb0483
active boot switches: -d:release -d:nimUseLinenoise
The text was updated successfully, but these errors were encountered:
Example
Current Output
Additional Information
The text was updated successfully, but these errors were encountered: