瀏覽代碼

* since we insert the internal ansistring record types in the symtable of
the current module, also search it only there so that it doesn't depend
on the state of the symtablestack (hopefully fixes mantis #28109)

git-svn-id: trunk@30879 -

Jonas Maebe 10 年之前
父節點
當前提交
b5081d76c6
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      compiler/aasmcnst.pas

+ 5 - 3
compiler/aasmcnst.pas

@@ -389,6 +389,7 @@ implementation
 
 
    uses
    uses
      verbose,globals,systems,widestr,
      verbose,globals,systems,widestr,
+     fmodule,
      symbase,symtable,defutil;
      symbase,symtable,defutil;
 
 
 {****************************************************************************
 {****************************************************************************
@@ -1314,12 +1315,13 @@ implementation
        if optionalname<>'' then
        if optionalname<>'' then
          begin
          begin
            if optionalname[1]='$' then
            if optionalname[1]='$' then
-             found:=searchsym_type(copy(optionalname,2,length(optionalname)),srsym,srsymtable)
+             found:=searchsym_in_module(current_module,copy(optionalname,2,length(optionalname)),srsym,srsymtable)
            else
            else
-             found:=searchsym_type(optionalname,srsym,srsymtable);
+             found:=searchsym_in_module(current_module,optionalname,srsym,srsymtable);
            if found then
            if found then
              begin
              begin
-               if ttypesym(srsym).typedef.typ<>recorddef then
+               if (srsym.typ<>typesym) or
+                  (ttypesym(srsym).typedef.typ<>recorddef) then
                  internalerror(2014091207);
                  internalerror(2014091207);
                result:=trecorddef(ttypesym(srsym).typedef);
                result:=trecorddef(ttypesym(srsym).typedef);
                maybe_begin_aggregate(result);
                maybe_begin_aggregate(result);