summary refs log tree commit diff stats
path: root/tests/template/tpattern_with_converter.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/template/tpattern_with_converter.nim')
-rw-r--r--tests/template/tpattern_with_converter.nim27
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/template/tpattern_with_converter.nim b/tests/template/tpattern_with_converter.nim
deleted file mode 100644
index e0632552b..000000000
--- a/tests/template/tpattern_with_converter.nim
+++ /dev/null
@@ -1,27 +0,0 @@
-discard """
-  output: 10.0
-"""
-
-type
-  MyFloat = object
-    val: float
-
-converter to_myfloat*(x: float): MyFloat {.inline.} =
-  MyFloat(val: x)
-
-proc `+`(x1, x2: MyFloat): MyFloat =
-  MyFloat(val: x1.val + x2.val)
-
-proc `*`(x1, x2: MyFloat): MyFloat =
-    MyFloat(val: x1.val * x2.val)
-
-template optMul{`*`(a, 2.0)}(a: MyFloat): MyFloat =
-  a + a
-
-func floatMyFloat(x: MyFloat): MyFloat =
-  result = x * 2.0
-
-func floatDouble(x: float): float =
-  result = x * 2.0
-
-echo floatDouble(5)
\ No newline at end of file