diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim index 0052e178b0..5ab7c65ef2 100644 --- a/compiler/lambdalifting.nim +++ b/compiler/lambdalifting.nim @@ -495,6 +495,13 @@ proc liftLambdas(fn: PSym, body: PNode): PNode = var o = newOuterContext(fn) let ex = closureCreationPoint(body) o.currentEnv = newEnv(fn, nil, ex) + # put all params into the environment so they can be captured: + let params = fn.typ.n + for i in 1.. var conversion; the compiler may store an object implicitly on the heap for write barrier efficiency; better: proc specialization in the code gen - EcmaScript needs a new and better code gen: simply adapt the C code gen to it +- dead code elim for JS backend; 'of' operator for JS backend - tlastmod returns wrong results on BSD (Linux, MacOS X: works) - nested tuple unpacking; tuple unpacking in non-var-context - 'nimrod def': does not always work?