Both trunk and 1.4.0 compiles for me on various platforms where different Lazarus versions are available. I use Lazarus 3.6 on my workstation. And there method with constref parameter is required according to the FPC file generics.defaults.pas:
TOnComparison<T> = function(constref Left, Right: T): Integer of object;
TComparisonFunc<T> = function(constref Left, Right: T): Integer;
TComparer<T> = class(TInterfacedObject, IComparer<T>)
public
class function Default: IComparer<T>; static;
function Compare(constref ALeft, ARight: T): Integer; virtual; abstract; overload;
class function Construct(const AComparison: TOnComparison<T>): IComparer<T>; overload;
class function Construct(const AComparison: TComparisonFunc<T>): IComparer<T>; overload;
end;
That constref thing was changed in recent versions of Lazarus/FPC. Is it possible that your version is somehow not clean? Do you run it on Windows or Linux? Can you verify build with clean Lazarus and FPC? Also check that that the lazarus configuration is correct as it might point to the older locations or FPC and other components.
Mode delphi is set in the project file so it is set by default for all .pas files in the project.
Trunk and 1.4.0 version are pretty close right now as I did just bug hunting & fixing and no new development was done yet.