Răsfoiți Sursa

fcl-passrc: useanalyzer: do not export resourcestrings

git-svn-id: trunk@43310 -
Mattias Gaertner 5 ani în urmă
părinte
comite
acc72f01a1

+ 4 - 1
packages/fcl-passrc/src/pasuseanalyzer.pas

@@ -1404,7 +1404,10 @@ begin
       UseVariable(TPasVariable(Decl),rraNone,true);
       end
     else if C=TPasResString then
-      UseResourcestring(TPasResString(Decl))
+      begin
+      if OnlyExports then continue;
+      UseResourcestring(TPasResString(Decl));
+      end
     else if C=TPasAttributes then
       // attributes are never used directly
     else

+ 1 - 1
packages/fcl-passrc/tests/tcuseanalyzer.pas

@@ -842,9 +842,9 @@ begin
   StartProgram(false);
   Add([
   'resourcestring',
-  'resourcestring',
   '  {#a_used}a = ''txt'';',
   '  {#b_used}b = ''foo'';',
+  '  {#c_notused}c = ''bar'';',
   'procedure {#DoIt_used}DoIt(s: string);',
   'var',
   '  {#d_used}d: string;',