tnil_type.nim 204 B

12345678910111213141516
  1. discard """
  2. targets: "c cpp"
  3. """
  4. proc f1(v: typeof(nil)) = discard
  5. f1(nil)
  6. proc f2[T]() = discard
  7. f2[typeof(nil)]()
  8. proc f3(_: typedesc) = discard
  9. f3(typeof(nil))
  10. proc f4[T](_: T) = discard
  11. f4(nil)