start of tests refactoring; sqlite3 new wrapper fixes

This commit is contained in:
rumpf_a@web.de 2010-02-21 19:42:36 +01:00
commit d913fdb280
173 changed files with 206 additions and 238 deletions

14
tests/reject/ttempl2.nim Normal file
View file

@ -0,0 +1,14 @@
template declareInScope(x: expr, t: typeDesc): stmt =
var x: t
template declareInNewScope(x: expr, t: typeDesc): stmt =
# open a new scope:
block:
var x: t
declareInScope(a, int)
a = 42 # works, `a` is known here
declareInNewScope(b, int)
b = 42 #ERROR_MSG undeclared identifier: 'b'