tmiscunderscore.nim 270 B

12345678910111213141516
  1. import std/assertions
  2. block:
  3. proc _() = echo "one"
  4. doAssert not compiles(_())
  5. proc _() = echo "two"
  6. doAssert not compiles(_())
  7. block:
  8. type _ = int
  9. doAssert not (compiles do:
  10. let x: _ = 3)
  11. type _ = float
  12. doAssert not (compiles do:
  13. let x: _ = 3)