tinferred_generic_const.nim 325 B

123456789101112131415
  1. discard """
  2. action: run
  3. """
  4. block:
  5. proc something(a: string or int or float) =
  6. const (c, d) = (default a.type, default a.type)
  7. block:
  8. proc something(a: string or int) =
  9. const c = default a.type
  10. block:
  11. proc something(a: string or int) =
  12. const (c, d, e) = (default a.type, default a.type, default a.type)