summary refs log tree commit diff stats
path: root/tests/converter/texplicit_conversion.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/converter/texplicit_conversion.nim')
-rw-r--r--tests/converter/texplicit_conversion.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/converter/texplicit_conversion.nim b/tests/converter/texplicit_conversion.nim
new file mode 100644
index 000000000..e36d78ad5
--- /dev/null
+++ b/tests/converter/texplicit_conversion.nim
@@ -0,0 +1,19 @@
+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))
\ No newline at end of file