Browse Source

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 years ago
parent
commit
59198b8503
1 changed files with 1 additions and 0 deletions
  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) }