From 39ebe2175bd4e8e62d03875d06b24feafd36f8f7 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 30 Jul 2016 16:28:58 +0200 Subject: compiler almost free of deprecated expr/stmt names --- compiler/guards.nim | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'compiler/guards.nim') diff --git a/compiler/guards.nim b/compiler/guards.nim index 5ad932e48..4e887d3e3 100644 --- a/compiler/guards.nim +++ b/compiler/guards.nim @@ -728,12 +728,12 @@ proc simpleSlice*(a, b: PNode): BiggestInt = result = -1 -template isMul(x): expr = x.getMagic in someMul -template isDiv(x): expr = x.getMagic in someDiv -template isAdd(x): expr = x.getMagic in someAdd -template isSub(x): expr = x.getMagic in someSub -template isVal(x): expr = x.kind in {nkCharLit..nkUInt64Lit} -template isIntVal(x, y): expr = x.intVal == y +template isMul(x): untyped = x.getMagic in someMul +template isDiv(x): untyped = x.getMagic in someDiv +template isAdd(x): untyped = x.getMagic in someAdd +template isSub(x): untyped = x.getMagic in someSub +template isVal(x): untyped = x.kind in {nkCharLit..nkUInt64Lit} +template isIntVal(x, y): untyped = x.intVal == y import macros @@ -776,8 +776,8 @@ proc isMinusOne(n: PNode): bool = proc pleViaModel(model: TModel; aa, bb: PNode): TImplication proc ple(m: TModel; a, b: PNode): TImplication = - template `<=?`(a,b): expr = ple(m,a,b) == impYes - template `>=?`(a,b): expr = ple(m, nkIntLit.newIntNode(b), a) == impYes + template `<=?`(a,b): untyped = ple(m,a,b) == impYes + template `>=?`(a,b): untyped = ple(m, nkIntLit.newIntNode(b), a) == impYes # 0 <= 3 if a.isValue and b.isValue: -- cgit 1.4.1-2-gfad0