[fpc-pascal] Doubt related to the issue #30498

silvioprog silvioprog at gmail.com
Tue Aug 23 19:15:28 CEST 2016


On Tue, Aug 23, 2016 at 2:57 AM, Sven Barth <pascaldragon at googlemail.com>
wrote:
[...]

> See here: http://bugs.freepascal.org/view.php?id=30503
>
> Regards,
> Sven
>
Thank you! :-)

I did:

...
{$IFDEF FPC}
var
  VPairs: TArray<TPair<TClass, string>>;
{$ENDIF}
begin
...
{$IFDEF FPC}
  // issues #30503 and #30498
  SetLength(VPairs, 2);
  VPairs[0] := TPair<TClass, string>.Create(TMyObject, 'my qualifier');
  VPairs[1] := TPair<TClass, string>.Create(TMySerializable,
TMySerializable.QualifiedClassName);
  TClassRegistry.Register(VPairs);
{$ELSE}
  TClassRegistry.Register([TPair<TClass, string>.Create(TMyObject, 'my
qualifier'),
    TPair<TClass, string>.Create(TMySerializable, TMySerializable.
QualifiedClassName)]);
{$ENDIF}
...

and now my test-case compiles fine.

--
Silvio Cl├ęcio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160823/f5ce916b/attachment.html>


More information about the fpc-pascal mailing list