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

Parameter constraints: undeclared identifier '{}' within a template scope #7524

Closed
mratsim opened this issue Apr 6, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@mratsim
Copy link
Collaborator

commented Apr 6, 2018

Parameter constraints do not work within a template and trigger and undeclared identifier.

template in_to_out(typIn, typOut: typedesc) =
  proc to_out(x: typIn{lit}): typOut = result = ord(x)

# Generating the proc via template doesn't work
in_to_out(char, int)

# This works
proc to_out2(x: char{lit}): int = result = ord(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.