浏览代码

* don't look in objectsymtable when parsing the function return type

peter 22 年之前
父节点
当前提交
c1c8c5dbb1
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      compiler/pdecsub.pas

+ 10 - 1
compiler/pdecsub.pas

@@ -736,6 +736,7 @@ implementation
       var
       var
         pd : tprocdef;
         pd : tprocdef;
         hs : string;
         hs : string;
+        oldst : tsymtable;
         isclassmethod : boolean;
         isclassmethod : boolean;
       begin
       begin
         pd:=nil;
         pd:=nil;
@@ -760,7 +761,12 @@ implementation
                   if try_to_consume(_COLON) then
                   if try_to_consume(_COLON) then
                    begin
                    begin
                      inc(testcurobject);
                      inc(testcurobject);
+                     { Don't look in the objectsymtable for types }
+                     oldst:=symtablestack;
+                     if symtablestack.symtabletype=objectsymtable then
+                      symtablestack:=symtablestack.next;
                      single_type(pd.rettype,hs,false);
                      single_type(pd.rettype,hs,false);
+                     symtablestack:=oldst;
                      pd.test_if_fpu_result;
                      pd.test_if_fpu_result;
                      dec(testcurobject);
                      dec(testcurobject);
                    end
                    end
@@ -2149,7 +2155,10 @@ const
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.140  2003-10-01 16:49:05  florian
+  Revision 1.141  2003-10-01 18:28:55  peter
+    * don't look in objectsymtable when parsing the function return type
+
+  Revision 1.140  2003/10/01 16:49:05  florian
     * para items are now reversed for pascal calling conventions
     * para items are now reversed for pascal calling conventions
 
 
   Revision 1.139  2003/09/28 21:44:55  peter
   Revision 1.139  2003/09/28 21:44:55  peter