Files
Nim/tests/converter/texplicit_conversion.nim
Jason Beetham 83a2515af7 Fixed generic distinct conversions for 'var' (#18837)
* SameTypeAux now properly traverses generic distincts

* Smarter traversal of distincts

* Removed redundant check

* Fixed nkConv for jsgen

* Added test for non distinct nkConv

* using skiptypes for distinct now

* Fixed genaddr for nkconv
2021-10-26 11:27:11 +02:00

19 lines
241 B
Nim

discard """
output: "234"
"""
# bug #4432
import strutils
converter toInt(s: string): int =
result = parseInt(s)
let x = (int)"234"
echo x
block: # Test for nkconv
proc foo(o: var int) =
assert o == 0
var a = 0
foo(int(a))