Browse Source

* Fixed lost default value in case of a property override

git-svn-id: trunk@12114 -
michael 16 years ago
parent
commit
11a41788fb
1 changed files with 5 additions and 3 deletions
  1. 5 3
      compiler/pdecvar.pas

+ 5 - 3
compiler/pdecvar.pas

@@ -285,6 +285,7 @@ implementation
          { Generate propertysym and insert in symtablestack }
          { Generate propertysym and insert in symtablestack }
          p:=tpropertysym.create(orgpattern);
          p:=tpropertysym.create(orgpattern);
          p.visibility:=symtablestack.top.currentvisibility;
          p.visibility:=symtablestack.top.currentvisibility;
+         p.default:=longint($80000000);
          symtablestack.top.insert(p);
          symtablestack.top.insert(p);
          consume(_ID);
          consume(_ID);
          { property parameters ? }
          { property parameters ? }
@@ -632,12 +633,13 @@ implementation
          else if try_to_consume(_NODEFAULT) then
          else if try_to_consume(_NODEFAULT) then
            begin
            begin
               p.default:=longint($80000000);
               p.default:=longint($80000000);
-           end
-         else if allow_default_property(p) then
+           end;
+(*
+         else {if allow_default_property(p) then
            begin
            begin
               p.default:=longint($80000000);
               p.default:=longint($80000000);
            end;
            end;
-
+*)
          { Parse possible "implements" keyword }
          { Parse possible "implements" keyword }
          if try_to_consume(_IMPLEMENTS) then
          if try_to_consume(_IMPLEMENTS) then
            begin
            begin