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

Typedesc ~= Generic notation does not work anymore! #4534

Closed
oderwat opened this issue Jul 29, 2016 · 0 comments
Closed

Typedesc ~= Generic notation does not work anymore! #4534

oderwat opened this issue Jul 29, 2016 · 0 comments

Comments

@oderwat
Copy link
Contributor

oderwat commented Jul 29, 2016

In the past one could write the typedesc parameter as generic notation. This seems not to work anymore.

Example:

# typedesc parameter

proc unit(t: typedesc[int]): t = 0
proc unit(t: typedesc[string]): t = ""
proc unit(t: typedesc[float]): t = 0.0

assert unit(int) == 0
assert unit(string) == ""
assert unit(float) == 0.0

# following seems not to work (anymore?)
when false:
  assert unit[int]() == 0
  assert unit[string]() == 0
  assert unit[float]() == 0

@Araq said this should still work, therefor I wrote this report :)

@Araq Araq closed this as completed in 0ed8d80 Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant