added the 'x.p[:T]' notation for explicit generic instantiations in combination with the ddot calling syntax

This commit is contained in:
Araq 2018-04-06 22:05:47 +02:00
commit 212fdc5946
9 changed files with 81 additions and 53 deletions

View file

@ -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]