浏览代码

Avoid an internal error for accessing fields of a reference counted class.

ncgmem.pas, tcgsubscriptnode:
  * pass_generate_code: classes can now be managed types as well, so don't generate an internal error in case such a class is subscripted

git-svn-id: branches/svenbarth/arc@28871 -
svenbarth 10 年之前
父节点
当前提交
59198b8503
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      compiler/ncgmem.pas

+ 1 - 0
compiler/ncgmem.pas

@@ -334,6 +334,7 @@ implementation
          if is_implicit_pointer_object_type(left.resultdef) then
            begin
              if (not is_managed_type(left.resultdef)) or
+                 is_class(left.resultdef) or
                 (target_info.system in systems_garbage_collected_managed_types) then
                begin
                  { the contents of a class are aligned to a sizeof(pointer) }