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

wrong: has unspecified generic parameters when using generic template inside a generic proc #8505

Closed
timotheecour opened this issue Aug 1, 2018 · 1 comment

Comments

@timotheecour
Copy link
Member

rnim -d:case1 bugs/t77_unspecified_generic_parameters.nim
nim c --nimcache:/tmp/nim//nimcache/ -o:/tmp/nim//app -r -d:case1 bugs/t77_unspecified_generic_parameters.nim
/Users/timothee/git_clone/nim/timn/bugs/t77_unspecified_generic_parameters.nim(8, 17) Error: 'bar' has unspecified generic parameters
  proc foo[T]() = bar[int]()
when defined(case1):
  # Error: 'bar' has unspecified generic parameters;  proc foo[T]() = bar[T]()
  template bar[T]() = discard
when defined(case2):
  # ok
  proc bar[T]() = discard

proc foo[T]() = bar[int]()
@metagn
Copy link
Collaborator

metagn commented Sep 16, 2023

Works now probably due to #21671

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