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
# Note: neither of these are exported, but are available in module atypeFoo=objectprocfoo(f: Foo) =discardtemplateworks*() =var f: Foofoo(f)
templateboom*() =bind foo # tried this, but doesn't helpvar f: Foo
f.foo() # Error: attempting to call undeclared routine: 'foo'
f.foo # Error: undeclared field: 'foo' for type a.Foo
b.nim:
import a
works()
boom()
Current Output
> nim r b
Hint: used config file '/home/mstearn/.choosenim/toolchains/nim-1.6.6/config/nim.cfg' [Conf]
Hint: used config file '/home/mstearn/.choosenim/toolchains/nim-1.6.6/config/config.nims' [Conf]
..........................................................
/home/mstearn/nim/realm/b.nim(4, 5) template/generic instantiation of `boom` from here
/home/mstearn/nim/realm/a.nim(11, 4) Error: attempting to call undeclared routine: 'foo'
(Also repros with devel)
Expected Output
should compile
Possible Solution
🤷
Additional Information
This seems to go back to pre 1.0 (I tried 1.2.0 and 0.20.0 in addition to 1.6.6 and devel)
> nim -v
Nim Compiler Version 1.6.6 [Linux: amd64]
Compiled at 2022-05-05
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: 0565a70eab02122ce278b98181c7d1170870865c
active boot switches: -d:releas
The text was updated successfully, but these errors were encountered:
Example
a.nim:
b.nim:
Current Output
(Also repros with devel)
Expected Output
should compile
Possible Solution
🤷
Additional Information
This seems to go back to pre 1.0 (I tried 1.2.0 and 0.20.0 in addition to 1.6.6 and devel)
The text was updated successfully, but these errors were encountered: