cleanup of some tests

This commit is contained in:
Araq
2015-11-30 00:21:58 +01:00
parent 217e0ab6e9
commit 0d8c762452
2 changed files with 5 additions and 5 deletions

View File

@@ -17,12 +17,12 @@ type
TFoo[T] = object
val: T
T1 = expr
T2 = expr
T1 = auto
T2 = auto
Numeric = int|float
proc takesExpr(x, y) =
proc takesExpr(x, y: auto) =
echo x, y
proc same(x, y: T1) =
@@ -31,7 +31,7 @@ proc same(x, y: T1) =
proc takesFoo(x, y: TFoo) =
echo x.val, y.val
proc takes2Types(x,y: T1, z: T2) =
proc takes2Types[T1, T2](x,y: T1, z: T2) =
echo x, y, z
takesExpr(1, 2)

View File

@@ -32,7 +32,7 @@ static: assert(f.y.type.name == "string")
when compiles(f.z):
{.error: "Foo should not have a `z` field".}
proc p(a, b) =
proc p(a, b: auto) =
when a.type is int:
static: assert false