Browse Source

* allow self parameter for normal procedures again (because Kylix allows
it too) ("merged")

Jonas Maebe 24 years ago
parent
commit
2c87e58a77
2 changed files with 10 additions and 9 deletions
  1. 5 4
      compiler/pdecsub.pas
  2. 5 5
      compiler/psub.pas

+ 5 - 4
compiler/pdecsub.pas

@@ -169,9 +169,6 @@ implementation
             end
             end
           else
           else
             begin
             begin
-             { necessary to be able to catch this error later on in psub.pas }
-             if (idtoken = _SELF) then
-               include(aktprocdef.procoptions,po_containsself);
              { read identifiers }
              { read identifiers }
                sc:=consume_idlist;
                sc:=consume_idlist;
 {$ifdef fixLeaksOnError}
 {$ifdef fixLeaksOnError}
@@ -1931,7 +1928,11 @@ const
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.37  2001-09-10 10:26:26  jonas
+  Revision 1.38  2001-10-01 13:38:44  jonas
+    * allow self parameter for normal procedures again (because Kylix allows
+      it too) ("merged")
+
+  Revision 1.37  2001/09/10 10:26:26  jonas
     * fixed web bug 1593
     * fixed web bug 1593
     * writing of procvar headers is more complete (mention var/const/out for
     * writing of procvar headers is more complete (mention var/const/out for
       paras, add "of object" if applicable)
       paras, add "of object" if applicable)

+ 5 - 5
compiler/psub.pas

@@ -603,10 +603,6 @@ implementation
          parse_proc_directives(pdflags);
          parse_proc_directives(pdflags);
          dec(lexlevel);
          dec(lexlevel);
 
 
-      { explicit "self" parameters are not allowed for normal procedures (JM) }
-         if (po_containsself in aktprocsym.definition.procoptions) then
-           Message(parser_e_self_in_non_message_handler);
-
       { hint directives, these can be separated by semicolons here,
       { hint directives, these can be separated by semicolons here,
         that need to be handled here with a loop (PFV) }
         that need to be handled here with a loop (PFV) }
          while try_consume_hintdirective(aktprocsym.symoptions) do
          while try_consume_hintdirective(aktprocsym.symoptions) do
@@ -845,7 +841,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.37  2001-09-10 10:26:26  jonas
+  Revision 1.38  2001-10-01 13:38:45  jonas
+    * allow self parameter for normal procedures again (because Kylix allows
+      it too) ("merged")
+
+  Revision 1.37  2001/09/10 10:26:26  jonas
     * fixed web bug 1593
     * fixed web bug 1593
     * writing of procvar headers is more complete (mention var/const/out for
     * writing of procvar headers is more complete (mention var/const/out for
       paras, add "of object" if applicable)
       paras, add "of object" if applicable)