浏览代码

* fixed line information for constructor code added to new block while
generating the afterconstruction code

git-svn-id: trunk@34450 -

Jonas Maebe 9 年之前
父节点
当前提交
adcf07aabb
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      compiler/psub.pas

+ 2 - 1
compiler/psub.pas

@@ -743,12 +743,13 @@ implementation
                 if assigned(srsym) and
                    (srsym.typ=procsym) then
                   begin
-                    current_filepos:=exitpos;
+                    current_filepos:=entrypos;
                     constructionblock:=internalstatements(newstatement);
                     { first execute all constructor code. If no exception
                       occurred then we will execute afterconstruction,
                       otherwise we won't (the exception will jump over us) }
                     addstatement(newstatement,tocode);
+                    current_filepos:=exitpos;
                     { if implicit finally node wasn't created, then exit label and
                       finalization code must be handled here and placed before
                       afterconstruction }