proc arguments are in scope when the result type definition is being processed

This is intended for type deduction depending on the arguments
proc foo(x: type): type(expr(x))
This commit is contained in:
Zahary Karadjov 2011-12-09 15:56:48 +02:00
commit de4b894541
5 changed files with 16 additions and 5 deletions

View file

@ -35,3 +35,6 @@ var y*: type(t2(100)) = "test"
proc t6*(x: type(t3(0))): type(t1(0)) =
result = $x
proc t7*(x: int): type($x) =
result = "test"