Browse Source

* give an internalerror if a typed const builder is finalised while there
is still an unfinished aggregate

git-svn-id: trunk@31254 -

Jonas Maebe 10 years ago
parent
commit
c946a85ae6
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/aasmcnst.pas

+ 5 - 0
compiler/aasmcnst.pas

@@ -814,6 +814,11 @@ implementation
      var
        prelist: tasmlist;
      begin
+       { have we finished all aggregates? }
+       if (getcurragginfo<>nil) and
+          { in case of syntax errors, the aggregate may not have been finished }
+          (ErrorCount=0) then
+         internalerror(2015072301);
        prelist:=tasmlist.create;
        { only now add items based on the symbolname, because it may be
          modified by the "section" specifier in case of a typed constant }