summary refs log tree commit diff stats
path: root/tests/run/toverlop.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/toverlop.nim')
-rwxr-xr-xtests/run/toverlop.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/run/toverlop.nim b/tests/run/toverlop.nim
new file mode 100755
index 000000000..ce302345f
--- /dev/null
+++ b/tests/run/toverlop.nim
@@ -0,0 +1,16 @@
+discard """
+  file: "toverlop.nim"
+  output: "3"
+"""
+# Test operator overloading

+

+proc `%` (a, b: int): int =

+  return a mod b

+

+var x, y: int

+x = 15

+y = 6

+write(stdout, x % y)

+#OUT 3

+
+