summary refs log tree commit diff stats
path: root/tests/overload/tstatic_with_converter.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/overload/tstatic_with_converter.nim')
-rw-r--r--tests/overload/tstatic_with_converter.nim8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/overload/tstatic_with_converter.nim b/tests/overload/tstatic_with_converter.nim
index 8209e8399..2bc1dfaab 100644
--- a/tests/overload/tstatic_with_converter.nim
+++ b/tests/overload/tstatic_with_converter.nim
@@ -1,7 +1,6 @@
 discard """
 output: '''
 9.0
-
 '''
 """
 
@@ -39,12 +38,11 @@ proc `^`(x: vfloat, exp: static[float]): vfloat =
   when exp == 0.5:
     sqrt(x)
   else:
-   pow(x, exp)
+    pow(x, exp)
  
 proc `$`(x: vfloat): string =
-  let y = cast[ptr float](unsafeAddr x)
-  # xxx not sure if intentional in this issue, but this returns ""
-  echo y[]
+  let y = cast[ptr float](addr x)
+  result = $y[]
  
 let x = set1(9.0)
 echo x^0.5