#1 2013-04-22 08:09:23

VojkoCendak
Member
From: Celje Slovenia
Registered: 2012-09-02
Posts: 93

ToObjectList compile error with Delphi2009

HI, Delphi2009ent

we have a problem with compiling latest source in mOrmot:

    {$ifdef UNICODE}
    /// create a TObjectList<TSQLRecord> with TSQLRecord instances corresponding
    // to this TSQLTable result set
    // - use the specified TSQLRecord class or create instances
    // of the first associated record class (from internal QueryTables[])
    // - always returns an instance, even if the TSQLTable is nil or void
    function ToObjectList<T: TSQLRecord>: TObjectList<T>; overload; <== [DCC Error] mORMot.pas(4571): E2511 Type parameter 'T' must be a class type
    {$endif}

I commented it and for now it works.

thank you,
Vojko

Offline

#2 2013-04-22 09:33:29

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: ToObjectList compile error with Delphi2009

It works perfectly with Delphi 2010 up to XE3...

So this is another problem of the generics implementation in Delphi 2009...

I've disabled TSQLTable.ToObjectList<T>: TObjectList<T> for this compiler version.
See http://synopse.info/fossil/info/de0ce78f83

Thanks for the report...

Offline

Board footer

Powered by FluxBB