Prechádzať zdrojové kódy

* use correct source code position for error messages about invalid
published fields (mantis #21035)

git-svn-id: trunk@20060 -

Jonas Maebe 13 rokov pred
rodič
commit
1f614b7efc
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      compiler/pdecvar.pas

+ 2 - 2
compiler/pdecvar.pas

@@ -1706,7 +1706,7 @@ implementation
              if (visibility=vis_published) and
                 not(is_class(hdef)) then
                begin
-                 Message(parser_e_cant_publish_that);
+                 MessagePos(tfieldvarsym(sc[0]).fileinfo,parser_e_cant_publish_that);
                  visibility:=vis_public;
                end;
 
@@ -1714,7 +1714,7 @@ implementation
                 not(oo_can_have_published in tobjectdef(hdef).objectoptions) and
                 not(m_delphi in current_settings.modeswitches) then
                begin
-                 Message(parser_e_only_publishable_classes_can_be_published);
+                 MessagePos(tfieldvarsym(sc[0]).fileinfo,parser_e_only_publishable_classes_can_be_published);
                  visibility:=vis_public;
                end;