t20883.nim 195 B

12345678910111213
  1. discard """
  2. action: reject
  3. errormsg: "type mismatch: got <float64> but expected 'typeof(U(0.000001))'"
  4. line: 8
  5. column: 22
  6. """
  7. proc foo*[U](x: U = U(1e-6)) =
  8. echo x
  9. foo[float]()
  10. foo()