Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi-BCB/Compiler/Delphi/Language/Dynamic Arrays    [ Add a report in this area ]  
Report #:  122179   Status: Closed
The "Magic" contstructor of dynamic arrays accepts comma at the end
Project:  Delphi Build #:  19.0.14356.6604
Version:    19.2 Submitted By:   Maxim Vlasov
Report Type:  Minor failure / Design problem Date Reported:  2/2/2014 6:23:35 AM
Severity:    Infrequently encountered problem Last Updated: 4/15/2014 6:32:28 PM
Platform:    All platforms Internal Tracking #:   47168
Resolution: Fixed (Resolution Comments) Resolved in Build: : XE6
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 10
The "Magic" contstructor of dynamic arrays accepts comma at the end.

See also discussion about this topic at:
Steps to Reproduce:
The following example successfully compiles on Delphi XE5 although it should not (the comma at the end of the constructor)
procedure TestProc;
  a: TBytes;
  a:=TBytes.Create(12, 13,);

The same example compiles on Delphi 2007 also.
Not a big deal, but code analysis tools and other parsing tools might expect correct behaviar in this case.

Maxim Vlasov at 2/10/2014 12:30:16 PM -
Great to hear it was fixed so fast, please, don't forget to  check the line that was the inspiration behind this. Thanks

>> Fmx.Bind.Editors.pas
    TComboBox, { <- here is the comma }
    'SelectedValue(Self)', sFmx);

Server Response from: ETNACODE01