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

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

Projects

None yet

1 participant

@oderwat
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 added a commit that closed this issue Jul 31, 2016
@Araq Araq fixes #4534 0ed8d80
@Araq Araq closed this in 0ed8d80 Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment