<p dir="ltr">Hello,</p>
<p dir="ltr">A possible inline way (without declaring specialized local variables) to compile the attached test at the<a href="http://bugs.freepascal.org/view.php?id=30498"> issue #30498</a> is:</p>
<p dir="ltr">...<br>
<tt><tt>  procedure Test(const AItems: TArray<string>);</tt></tt><br>
<tt><tt>  begin</tt></tt><br>
<tt><tt>  end;</tt></tt></p>
<p dir="ltr"><tt><tt>begin</tt></tt><br>
<tt><tt>  // </tt></tt>Test(['foo', 'bar']); issue #<tt><tt>30498</tt></tt><br>
<tt><tt>  Test(TArray<string>.Create('foo', 'bar'));</tt></tt><br>
...</p>
<p dir="ltr">However, how to do something like this in the following declaration?:</p>
<p dir="ltr">...<br>
<tt><tt>procedure Test(const AItems: TArray<TPair<string, string>>);</tt></tt><br>
...</p>
<p dir="ltr">I've tried:</p>
<p dir="ltr">...<br>
<tt><tt>  procedure Test(const AItems: TArray<TPair<string, string>>);</tt></tt><br>
<tt><tt>  begin</tt></tt><br>
<tt><tt>  end;</tt></tt></p>
<p dir="ltr"><tt><tt>begin</tt></tt><br>
<tt><tt>  Test(TArray<TPair<string, string>>.Create(TPair<string, string>.Create('foo', 'bar')));</tt></tt><br>
...</p>
<p dir="ltr">Got:</p>
<p dir="ltr">project1.dpr(18,37) Error: Illegal expression<br>
<tt><tt>project1.dpr(18,38) Fatal: Syntax error, ")" expected but "identifier CREATE" found</tt></tt></p>
<p dir="ltr">Thank you!</p>
<p dir="ltr">--<br>
Silvio Clécio</p>