Grid error in OnGetAlignment

This code compiles in D11, but not in D12.
If I remove the classes in taCenter I also get an error in D11.
Strangely enough, I don't need Classes in taRightJustify.

procedure TfrmMyForm.MyGridGetAlignment(Sender: TObject; ARow, ACol:
Integer; var HAlign: TAlignment; var VAlign: TVAlignment);

begin
if acol in [3,4] then halign:=taRightJustify;
if acol in [5] then halign:=classes.taCenter;
end;

Error messages in D12


Error Message-2

Is the cause of error the Classes.taCenter?

How to solve?

TAlignment in the event handler definition is from the System.Classes.pas unit.
So prefixing it with System.Classes should work as it is the right type.

This works in all Delphi versions (10.x, 11.x, 12.x) I tested with:

procedure TForm1.AdvStringGrid1GetAlignment(Sender: TObject; ARow,
  ACol: Integer; var HAlign: TAlignment; var VAlign: TVAlignment);
begin
  HAlign := System.Classes.taCenter;
end;