Backwards-compatible support for keyword arguments in the command syntax

This commit is contained in:
Zahary Karadjov
2018-04-29 13:30:08 +03:00
committed by Andreas Rumpf
parent e678a4285d
commit b0d85b0adf
3 changed files with 19 additions and 7 deletions

View File

@@ -46,7 +46,8 @@ proc hasRegularArgs(x: int, y: string) =
echo "x: ", x, ", y: ", y
templateForwarding(hasRegularArgs, true, 1, "test 1")
templateForwarding(hasKeywordArgs, true, 2, "test 2")
templateForwarding(hasKeywordArgs, true, y = "test 3")
templateForwarding(hasKeywordArgs, true, y = "test 4", x = 4)
templateForwarding hasKeywordArgs, true, 2, "test 2"
templateForwarding(hasKeywordArgs, true, y = "test 3")
templateForwarding hasKeywordArgs, true, y = "test 4", x = 4