t20883.nim 227 B

1234567891011121314
  1. discard """
  2. action: reject
  3. nimout: '''
  4. t20883.nim(13, 4) template/generic instantiation of `foo` from here
  5. t20883.nim(9, 11) Error: cannot instantiate: 'U'
  6. '''
  7. """
  8. proc foo*[U](x: U = U(1e-6)) =
  9. echo x
  10. foo[float]()
  11. foo()