[fpc-devel] Scalar value is accepted as an argument for an openarray parameter

Skybuck Flying skybuck2000 at hotmail.com
Sun Jun 10 00:22:24 CEST 2012



-----Original Message----- 
From: Marc Weustink
Sent: Friday, June 08, 2012 9:08
To: FPC developers' list
Subject: Re: [fpc-devel] Scalar value is accepted as an argument for an 
openarray parameter

On 8-6-2012 8:18, Alexander Klenin wrote:
> The following code compiles both with :
>
> procedure F(const A: array of ShortInt); begin end;
> begin F(1); end.
>
> I think this is a bug in FPC, but if not -- it should be documented here:
> http://freepascal.org/docs-html/ref/refsu59.html#x157-16700014.4.5
>
> I am willing to file an issue one way or another.

"
Unfortunately Delphi (6) accepts this too. It took me some time at work
"

Delphi XE2 does not ;)

Bye,
  Skybuck :) 




More information about the fpc-devel mailing list