Because, again, many people do that, you are mixing up open array parameters with dynamic arrays.
The correct way is something like this:
{$mode objfpc}{$H+}
uses sysutils;
var
ATanggal:array of TDate;
generic procedure ArrayAdd<T>( var A:specialize TArray<T> ; Item:T); // take a good look!!
var
i:Integer;
begin
i := Length(A);
SetLength(A,i+1); // <=== No Error
A[i]:=item;
end;
begin
SetLength(ATanggal,0);
specialize ArrayAdd<TDate>( ATanggal, Date);
end.
There's more wrong, but the above is close to your code and works. At least with trunk. Can't test other versions today.