Browse Source

pastojs: fixed -O- and record const, issue 38683

mattias 4 years ago
parent
commit
247fac5cbd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/packages/pastojs/src/fppas2js.pp

+ 2 - 0
compiler/packages/pastojs/src/fppas2js.pp

@@ -20521,6 +20521,8 @@ begin
       mtRecord:
       mtRecord:
         // a published record publishes all non private members
         // a published record publishes all non private members
         if P.Visibility in [visPrivate,visStrictPrivate] then
         if P.Visibility in [visPrivate,visStrictPrivate] then
+          continue
+        else if P.ClassType=TPasConst then
           continue;
           continue;
       end;
       end;
       if not IsElementUsed(P) then continue;
       if not IsElementUsed(P) then continue;