Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Class Completion    [ Add a report in this area ]  
Report #:  81920   Status: Closed
Class completion with generics causes exception
Project:  Delphi Build #:  14.0.3593.25826
Version:    14.0 Submitted By:   Richard Bullin
Report Type:  Basic functionality failure Date Reported:  2/7/2010 1:16:13 PM
Severity:    Serious / Highly visible problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    32 Bit Internal Tracking #:   265190
Resolution: Fixed (Resolution Comments) Resolved in Build: : 15.0.3836.32265
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 1
Description
I get an exception when using class completion if it has a TObjectList in the class(As it is using generics)

The exception says. Expected ';' but '<' found in class TMyClass.

Follow steps below to reproduce
Steps to Reproduce:
Create a class as in the below in a new unit

    TMyClass = class
          ObjColl : TObjectList<TObject>;
          procedure Ok;
     end;

Put cursor over the procedure Ok and press ctrl+shift+c and you'll get the exception.
Workarounds
Don't use class completion or don't use generics or just don't use Delphi? :)
Attachment
None
Comments

Richard Bullin at 2/8/2010 7:46:13 PM -
This only happens if there is no member visibility defined (i.e. public,private), if you have public at the top it works.

Server Response from: ETNACODE01