Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Code Editor    [ Add a report in this area ]  
Report #:  106860   Status: Open
Generate excrescent 'end;'
Project:  Delphi Build #:  16.0.4504.48759
Version:    16.4 Submitted By:   wenjie zhou
Report Type:  Basic functionality failure Date Reported:  7/3/2012 2:11:43 AM
Severity:    Commonly encountered problem Last Updated: 7/4/2012 12:51:26 AM
Platform:    All versions Internal Tracking #:   29608
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 10
Description
Generate excrescent 'end;'

Put caret behide the SetLength; in [Steps]'s code, and press Enter.
Code Editor will generate excrescent 'end;' automatic.
Steps to Reproduce:
1.New VCL Project -> Put a button in form.

2.Write the TForm1.Button1Click as follow
-------------
procedure TForm1.Button1Click(Sender: TObject);
var
  t: array of TThread;
begin
  SetLength(t, 3);  

  t[0] := TThread.CreateAnonymousThread(
            procedure ()
            var
              B: Boolean;
            begin
              B := True;
              while B do
              begin
                OutputDebugString('Just a test');
                B := not B;
              end;
            end
            );

  t[1] := TThread.CreateAnonymousThread(
            procedure ()
            var
              B: Boolean;
            begin
              B := True;
              while B do
              begin
                OutputDebugString('Just a test');
                B := not B;
              end;
            end
            );

  t[2] := TThread.CreateAnonymousThread(
            procedure ()
            var
              B: Boolean;
            begin
              B := True;
              while B do
              begin
                OutputDebugString('Just a test');
                B := not B;
              end;
            end
            );

  t[0].Start;
  t[1].Start;
  t[2].Start;
end;
-------------

3.Put caret behide the SetLength; and press Enter. (Will generate excrescent 'end;' automatic.)
Workarounds
None
Attachment
None
Comments

Tomohiro Takahashi at 7/3/2012 6:58:28 AM -
Is your issue same as(similar to) QC#81691 ?

wenjie zhou at 7/3/2012 8:50:36 AM -
I can not ensure my issue is same with QC#81691.

The example in QC#81691 can not compile OK. But my example compiles ok.
In my example , the excrescent 'end;' will lead the program compiles failed.

Tomohiro Takahashi at 7/4/2012 5:28:47 PM -
This report was opened with valid Internal Tracking Number.
Thanks.

Server Response from: ETNACODE01