From e3b25e93ac95d192e42dfc56bf699f08d88ec99a Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 17 Mar 2012 18:58:59 +0100 Subject: [PATCH] unittest module compiles again --- lib/pure/unittest.nim | 10 +++++----- lib/system.nim | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index 7aca9929e1..9ff44632d7 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -93,8 +93,8 @@ template fail* = checkpoints = @[] macro check*(conditions: stmt): stmt = - proc standardRewrite(e: expr): stmt = - template rewrite(Exp, lineInfoLit: expr, expLit: string): stmt = + proc standardRewrite(e: PNimrodNode): PNimrodNode = + template rewrite(Exp, lineInfoLit: expr, expLit: string): PNimrodNode = if not Exp: checkpoint(lineInfoLit & ": Check failed: " & expLit) fail() @@ -105,9 +105,9 @@ macro check*(conditions: stmt): stmt = of nnkCall, nnkCommand, nnkMacroStmt: case conditions[1].kind of nnkInfix: - proc rewriteBinaryOp(op: expr): stmt = + proc rewriteBinaryOp(op: PNimrodNode): PNimrodNode = template rewrite(op, left, right, lineInfoLit: expr, opLit, - leftLit, rightLit: string, printLhs, printRhs: bool): stmt = + leftLit, rightLit: string, printLhs, printRhs: bool): PNimrodNode = block: var lhs = left @@ -152,7 +152,7 @@ template require*(conditions: stmt): stmt = check conditions macro expect*(exp: stmt): stmt = - template expectBody(errorTypes, lineInfoLit: expr, body: stmt): stmt = + template expectBody(errorTypes, lineInfoLit: expr, body: stmt): PNimrodNode = try: body checkpoint(lineInfoLit & ": Expect Failed, no exception was thrown.") diff --git a/lib/system.nim b/lib/system.nim index 323cfc1bb8..3248276eef 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -2220,7 +2220,7 @@ type template eval*(blk: stmt): stmt = ## executes a block of code at compile time just as if it was a macro - ## optonally, the block can return an AST tree that will replace the + ## optionally, the block can return an AST tree that will replace the ## eval expression block: macro payload(x: stmt): stmt = blk