Cardpackage.adb:17:29: error: must appear in the right-hand side of an assignment statement

There is a mesage error I am not familiar with:

cardpackage.adb:17:29: error: must appear in the right-hand side of an assignment statement
cardpackage.adb:18:37: error: must appear in the right-hand side of an assignment statement

type Deck (Number: Card_Number := 0) is record
	List: Array_Card(1..Number) := Initialize(Number);
end record;
__________________________________
procedure Deal (From, To: in out Deck; N: Card_Number) is
	begin
		From	:= (@.Number + N, To.List (To.List'Last-N+1..To.List'Last) & @.List); --17
		To		:= (@.Number - N, @.list(@.List'First..@.List'Last-N)); --18
	end Deal;

What do I miss ?

Try without the @, maybe you’ll get a different error message

It works but the question is why @ doesn’t. I filled an issue.

It’s an Ada 2022 feature. You need to use the right flag to compile.

I set the pragma Ada_2022, flags shouldn’t be needed.