another bugfix

This commit is contained in:
Araq
2012-06-21 19:20:45 +02:00
parent 4d9a5dc8ff
commit 26b64f9e4f
4 changed files with 2 additions and 5 deletions

View File

@@ -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

View File

@@ -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]

View File

@@ -18,3 +18,4 @@ macro test*(a: stmt): stmt =
test:
"hi"

View File

@@ -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