summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/lambdalifting.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim
index 1c0c2494a..53fca4863 100644
--- a/compiler/lambdalifting.nim
+++ b/compiler/lambdalifting.nim
@@ -772,7 +772,8 @@ proc liftLambdas*(fn: PSym, body: PNode; tooEarly: var bool): PNode =
   # However we can do lifting for the stuff which is *only* compiletime.
   let isCompileTime = sfCompileTime in fn.flags or fn.kind == skMacro
 
-  if body.kind == nkEmpty or (gCmd == cmdCompileToJS and not isCompileTime) or
+  if body.kind == nkEmpty or (
+      gCmd in {cmdCompileToPHP, cmdCompileToJS} and not isCompileTime) or
       fn.skipGenericOwner.kind != skModule:
     # ignore forward declaration:
     result = body