Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't call local procs using dot syntax in a template from another module #14894

Open
dawkot opened this issue Jul 3, 2020 · 3 comments
Open

Comments

@dawkot
Copy link

dawkot commented Jul 3, 2020

Example

y.nim:

proc myProc(s: string) = discard

template myTemplate* =
  "".myProc

x.nim:

import y

myTemplate()

Current Output

/home/user/programming/nim/x.nim(3, 11) template/generic instantiation of `myTemplate` from here
/home/user/programming/nim/y.nim(4, 13) Error: attempting to call undeclared routine: 'myProc'

Possible Solution

  • Change "".myProc() to myProc("")

Additional Information

Tested with 1.2.4 and 4f6acf2

@alaviss
Copy link
Collaborator

alaviss commented Jul 3, 2020

Possible duplicate of: #11733

@timotheecour
Copy link
Member

timotheecour commented Jul 4, 2020

if we close this as duplicate we should add it as test case in top post of #11733

@metagn
Copy link
Collaborator

metagn commented Sep 23, 2024

Works since #22076 same as #11733 which had a test case added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants