Explorar o código

variable trashing: don't trash internal syms

Since they're managed by the code generator, they should always be valid.
Jonas Maebe %!s(int64=3) %!d(string=hai) anos
pai
achega
5012e45d04
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      compiler/ngenutil.pas

+ 2 - 0
compiler/ngenutil.pas

@@ -889,6 +889,8 @@ implementation
     begin
       if not(tsym(p).typ in [localvarsym,paravarsym]) then
         exit;
+      if sp_internal in tsym(p).symoptions then
+        exit;
       maybe_trash_variable(stat^,tabstractnormalvarsym(p),cloadnode.create(tsym(p),tsym(p).owner));
     end;