Type aliasing bug on Mac Inte64 (Delphi 12)

67 views Asked by At

I have a large unit that compiled fine on Delphi 11. After testing on Delphi 12, it also compiled (after fixing some NativeInt/NativeInt codes) for Win32/64. However, it failed due to "[dccosx64 Fatal Error]: F2084 Internal Error: LC2227" when compiled for MacOS 64. I was able to nail it down to type aliasing and below is the minimal code to reproduce. The error is at the second type.

unit Unit1;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs;

type
  // Adding the next line fixes it, so it is caused by the pre-compiled System.Types
  // TInt64DynArray = TArray<Int64>;  
  TInt64s        = TInt64DynArray;
  TNInts         = TInt64s;

type // Error
  TForm1 = class(TForm)
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

end.

Since I installed the recent patch manually, I want to ask if this happens to your installation as well. Also, before I start tinkering with my codes, are there any settings/tweaks to fix it? Thanks!

0

There are 0 answers