use 'using' instead of 'sig' keyword; cleans up new features a bit
This commit is contained in:
parent
554a3e9335
commit
c9966a3e17
20 changed files with 109 additions and 74 deletions
|
|
@ -5,8 +5,8 @@ discard """
|
|||
|
||||
import typetraits
|
||||
|
||||
proc plus(a, b): auto = a + b
|
||||
proc makePair(a, b): auto = (first: a, second: b)
|
||||
proc plus(a, b: auto): auto = a + b
|
||||
proc makePair(a, b: auto): auto = (first: a, second: b)
|
||||
|
||||
proc `+`(a, b: string): seq[string] = @[a, b]
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ static: assert p[0].type is string
|
|||
echo i.type.name
|
||||
echo s.type.name
|
||||
|
||||
proc inst(a): auto =
|
||||
proc inst(a: auto): auto =
|
||||
static: echo "instantiated for ", a.type.name
|
||||
result = a
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue