summary refs log tree commit diff stats
path: root/tests/overload
diff options
context:
space:
mode:
authorhlaaftana <10591326+hlaaftana@users.noreply.github.com>2020-05-02 23:30:08 +0300
committerGitHub <noreply@github.com>2020-05-02 22:30:08 +0200
commitf50377986a6ed9d63a91daf9395fb210021fbc6f (patch)
tree4539687f1b27d002dcebdaba7c581c1ec63fc471 /tests/overload
parent0880f118d377f05067ddcdcf7788d2706c5f0c3a (diff)
downloadNim-f50377986a6ed9d63a91daf9395fb210021fbc6f.tar.gz
exp. features now in correct manual, closes #11932 (#14195)
Diffstat (limited to 'tests/overload')
-rw-r--r--tests/overload/tnamedparamoverloading.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/overload/tnamedparamoverloading.nim b/tests/overload/tnamedparamoverloading.nim
new file mode 100644
index 000000000..a7c37ba52
--- /dev/null
+++ b/tests/overload/tnamedparamoverloading.nim
@@ -0,0 +1,14 @@
+discard """
+  output: '''
+Using x: 2
+Using y: 2
+'''
+"""
+
+proc foo(x: int) =
+  echo "Using x: ", x
+proc foo(y: int) =
+  echo "Using y: ", y
+
+foo(x = 2)
+foo(y = 2)
\ No newline at end of file