Переглянути джерело

- undo hack from r25713
* fix maybe_parse_hint_directives() when it is called multiple times for a
procdef that has a deprecation message specified (fixes crashes
reported in #25101/#25165)

git-svn-id: trunk@25719 -

Jonas Maebe 11 роки тому
батько
коміт
9619ed8b4b
2 змінених файлів з 3 додано та 2 видалено
  1. 1 1
      compiler/pdecsub.pas
  2. 2 1
      compiler/ptype.pas

+ 1 - 1
compiler/pdecsub.pas

@@ -2483,7 +2483,7 @@ const
              _UNIMPLEMENTED,
              _EXPERIMENTAL,
              _DEPRECATED :
-               if ([m_delphi,m_objectivec1] * current_settings.modeswitches = [m_delphi]) and (pd.typ=procdef) then
+               if (m_delphi in current_settings.modeswitches) and (pd.typ=procdef) then
                  maybe_parse_hint_directives(tprocdef(pd))
                else
                  exit;

+ 2 - 1
compiler/ptype.pas

@@ -103,7 +103,8 @@ implementation
         if assigned(pd) then
           begin
             pd.symoptions:=pd.symoptions+dummysymoptions;
-            pd.deprecatedmsg:=deprecatedmsg;
+            if sp_has_deprecated_msg in dummysymoptions then
+              pd.deprecatedmsg:=deprecatedmsg;
           end
         else
           stringdispose(deprecatedmsg);