<p>Am 23.08.2016 04:24 schrieb "silvioprog" <<a href="mailto:silvioprog@gmail.com">silvioprog@gmail.com</a>>:<br>
><br>
> Hello,<br>
><br>
> A possible inline way (without declaring specialized local variables) to compile the attached test at the issue #30498 is:<br>
><br>
> ...<br>
> procedure Test(const AItems: TArray<string>);<br>
> begin<br>
> end;<br>
><br>
> begin<br>
> // Test(['foo', 'bar']); issue #30498<br>
> Test(TArray<string>.Create('foo', 'bar'));<br>
> ...<br>
><br>
> However, how to do something like this in the following declaration?:<br>
><br>
> ...<br>
> procedure Test(const AItems: TArray<TPair<string, string>>);<br>
> ...<br>
><br>
> I've tried:<br>
><br>
> ...<br>
> procedure Test(const AItems: TArray<TPair<string, string>>);<br>
> begin<br>
> end;<br>
><br>
> begin<br>
> Test(TArray<TPair<string, string>>.Create(TPair<string, string>.Create('foo', 'bar')));<br>
> ...<br>
><br>
> Got:<br>
><br>
> project1.dpr(18,37) Error: Illegal expression<br>
> project1.dpr(18,38) Fatal: Syntax error, ")" expected but "identifier CREATE" found</p>
<p>See here: <a href="http://bugs.freepascal.org/view.php?id=30503">http://bugs.freepascal.org/view.php?id=30503</a></p>
<p>Regards,<br>
Sven</p>