Explorar o código

Merged revisions 2419 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

r2419 (jonas)
* don't endlessly recurse in tobjectdef.gettypename if we need
to get the typename of aktobjectdef

git-svn-id: branches/fixes_2_0@2420 -

Jonas Maebe %!s(int64=19) %!d(string=hai) anos
pai
achega
1fc36c8488
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      compiler/symdef.pas

+ 8 - 1
compiler/symdef.pas

@@ -5241,7 +5241,14 @@ implementation
 
     function tobjectdef.gettypename:string;
       begin
-        gettypename:=typename;
+        if (self <> aktobjectdef) then
+          gettypename:=typename
+        else
+          { in this case we will go in endless recursion, because then  }
+          { there is no tsym associated yet with the def. It can occur  }
+          { (tests/webtbf/tw4757.pp), so for now give a generic name    }
+          { instead of the actual type name                             }
+          gettypename:='<Currently Parsed Class>';
       end;