texplicit_conversion.nim 241 B

12345678910111213141516171819
  1. discard """
  2. output: "234"
  3. """
  4. # bug #4432
  5. import strutils
  6. converter toInt(s: string): int =
  7. result = parseInt(s)
  8. let x = (int)"234"
  9. echo x
  10. block: # Test for nkconv
  11. proc foo(o: var int) =
  12. assert o == 0
  13. var a = 0
  14. foo(int(a))