summary refs log tree commit diff stats
path: root/tests/reject/tbind2.nim
diff options
context:
space:
mode:
authorrumpf_a@web.de <>2010-02-21 19:42:36 +0100
committerrumpf_a@web.de <>2010-02-21 19:42:36 +0100
commitd913fdb2800d83680e413cd8a5f07b7f85deac6e (patch)
tree09a284861adf96520059f211ba8bae1a76294a9c /tests/reject/tbind2.nim
parent6bc16904edd3738ab97573b9eeb3a6a7cce9574c (diff)
downloadNim-d913fdb2800d83680e413cd8a5f07b7f85deac6e.tar.gz
start of tests refactoring; sqlite3 new wrapper fixes
Diffstat (limited to 'tests/reject/tbind2.nim')
-rw-r--r--tests/reject/tbind2.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/reject/tbind2.nim b/tests/reject/tbind2.nim
new file mode 100644
index 000000000..41711083f
--- /dev/null
+++ b/tests/reject/tbind2.nim
@@ -0,0 +1,10 @@
+# Test the new ``bind`` keyword for templates
+
+proc p1(x: int8, y: int): int = return x + y
+proc p1(x: int, y: int8): int = return x - y
+
+template tempBind(x, y: expr): expr = 
+  bind p1(x, y)  #ERROR_MSG ambiguous call
+
+echo tempBind(1'i8, 2'i8)
+