Browse Source

* fixed Lazarus compilation

Jonas Maebe 20 years ago
parent
commit
d612918bb2
1 changed files with 12 additions and 6 deletions
  1. 12 6
      compiler/pexpr.pas

+ 12 - 6
compiler/pexpr.pas

@@ -1933,11 +1933,14 @@ implementation
                        not from self }
                        not from self }
                      if sym.typ in [procsym,propertysym] then
                      if sym.typ in [procsym,propertysym] then
                       begin
                       begin
-                        htype.setdef(classh);
-                        if (po_classmethod in current_procinfo.procdef.procoptions) or
-                           (po_staticmethod in current_procinfo.procdef.procoptions) then
-                          htype.setdef(tclassrefdef.create(htype));
-                        p1:=ctypenode.create(htype);
+                        if (sym.typ = procsym) then
+                          begin
+                            htype.setdef(classh);
+                            if (po_classmethod in current_procinfo.procdef.procoptions) or
+                               (po_staticmethod in current_procinfo.procdef.procoptions) then
+                              htype.setdef(tclassrefdef.create(htype));
+                            p1:=ctypenode.create(htype);
+                          end;
                       end
                       end
                      else
                      else
                       begin
                       begin
@@ -2532,7 +2535,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.183  2005-03-04 07:46:36  jonas
+  Revision 1.184  2005-03-04 09:56:35  jonas
+    * fixed Lazarus compilation
+
+  Revision 1.183  2005/03/04 07:46:36  jonas
     * properties can also be inherited/overridden
     * properties can also be inherited/overridden
 
 
   Revision 1.182  2005/03/03 19:58:14  jonas
   Revision 1.182  2005/03/03 19:58:14  jonas