diff options
author | Araq <rumpf_a@web.de> | 2018-04-06 22:05:47 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-04-06 22:05:57 +0200 |
commit | 212fdc5946a5ba8f72c83b427987d17bd67218a1 (patch) | |
tree | 0c021f54696f46f21a978331211f09a8c142badc /tests/parser | |
parent | 651c0e45da83a4d389f3fe8246e3835e400c47c4 (diff) | |
download | Nim-212fdc5946a5ba8f72c83b427987d17bd67218a1.tar.gz |
added the 'x.p[:T]' notation for explicit generic instantiations in combination with the ddot calling syntax
Diffstat (limited to 'tests/parser')
-rw-r--r-- | tests/parser/tprecedence.nim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/parser/tprecedence.nim b/tests/parser/tprecedence.nim index d2c6d0b30..d586f14a3 100644 --- a/tests/parser/tprecedence.nim +++ b/tests/parser/tprecedence.nim @@ -1,6 +1,7 @@ discard """ output: '''holla -true''' +true +defabc 4''' """ # Test top level semicolon works properly: @@ -13,3 +14,8 @@ proc `\*` (x, y: int): int = result = x * y echo 5 \+ 1 \* 9 == 6*9 +proc foo[S, T](x: S, y: T): T = x & y + +proc bar[T](x: T): T = x + +echo "def".foo[:string, string]("abc"), " ", 4.bar[:int] |