diff options
author | Araq <rumpf_a@web.de> | 2012-06-21 19:20:45 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-06-21 19:20:45 +0200 |
commit | 26b64f9e4f25a5cbeaed9f8e97f9a6b243818fb9 (patch) | |
tree | bd408e17d3354e73d181da34fd2aeed2b6213a61 | |
parent | 4d9a5dc8fff3fc7d455fb9e8044fde1338ee775e (diff) | |
download | Nim-26b64f9e4f25a5cbeaed9f8e97f9a6b243818fb9.tar.gz |
another bugfix
-rwxr-xr-x | compiler/evals.nim | 2 | ||||
-rwxr-xr-x | lib/pure/times.nim | 2 | ||||
-rwxr-xr-x | tests/compile/tmacro1.nim | 1 | ||||
-rwxr-xr-x | todo.txt | 2 |
4 files changed, 2 insertions, 5 deletions
diff --git a/compiler/evals.nim b/compiler/evals.nim index 45adcbc19..adff11567 100755 --- a/compiler/evals.nim +++ b/compiler/evals.nim @@ -340,7 +340,7 @@ proc evalVariable(c: PStackFrame, sym: PSym, flags: TEvalFlags): PNode = # which can be modified. var x = c while x != nil: - if sym.kind == skResult: + if sym.kind == skResult and x.params.len > 0: result = x.params[0] if result == nil: result = emptyNode return diff --git a/lib/pure/times.nim b/lib/pure/times.nim index eded16d21..e6163ad8c 100755 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -317,8 +317,6 @@ when not defined(ECMAScript): result.weekday = weekDays[int(tm.weekDay)] result.yearday = int(tm.yearday) result.isDST = tm.isDST > 0 - #result.tzname = if local: getTzname()[if result.isDST: 0 else: 1] else: "UTC" - # TODO: ^^^ Crashes the compiler. if local: if result.isDST: result.tzname = getTzname()[0] diff --git a/tests/compile/tmacro1.nim b/tests/compile/tmacro1.nim index b4fce9776..e96997c47 100755 --- a/tests/compile/tmacro1.nim +++ b/tests/compile/tmacro1.nim @@ -18,3 +18,4 @@ macro test*(a: stmt): stmt = test: "hi" + diff --git a/todo.txt b/todo.txt index 24f3267c6..09605f391 100755 --- a/todo.txt +++ b/todo.txt @@ -38,8 +38,6 @@ version 0.9.0 Bugs ---- -- result.tzname = if local: getTzname()[if result.isDST: 0 else: 1] else: "UTC" - Crashes the compiler. - bug: stress testing basic method example (eval example) without ``-d:release`` leaks memory? - bug: pragma statements in combination with symbol files are evaluated twice |