minify/lparser.lua

branch
lua5.2
changeset 94
cf209451be5f
parent 85
347ac1733354
child 99
2b6416334a25
--- a/minify/lparser.lua	Fri May 05 09:44:05 2017 +0100
+++ b/minify/lparser.lua	Fri May 05 09:44:43 2017 +0100
@@ -249,8 +249,8 @@
     xref = { nameref },         -- xref, first value is declaration
     decl = nameref,             -- location of declaration, = xref[1]
   }
-  if special then               -- "self" must be not be changed
-    localinfo[id].isself = true
+  if special or name == "_ENV" then               -- "self" must be not be changed
+    localinfo[id].preserve = true
   end
   -- this can override a local with the same name in the same scope
   -- but first, keep it inactive until it gets activated

mercurial