Closed kdheepak closed 5 years ago
Well, if you look at system.nim line 1541 that is also delete
. So, the problem is the wrong symbol is selected. As mentioned in DETAILS.md
rule 3, generic procs are not supported as dispatch targets. In your case, you aren't defining a new generic proc, but you are creating an overload with the same name as an existing generic proc. I am not sure that can be worked around in any way other than changing your name, e.g., remove
instead of delete
. To fix this problem in general, we need a way to guide getImpl
to the right symbol.
I think there is a thing in Nim where you can use backticks to escape default, so I tried to use `delete`
instead of delete
, I couldn't figure it out. I switched to remove instead.
If I create a package using
nimble init
calledcommandlinenim
and save the following in./src/commandlinenim.nim
,and change the nimble file to point to
cligen#head
, and run the following from the root directory,I get the following error
It appears that I cannot use
delete
as a function name.