Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
IDE
Add Component Template
Background compile
Batch file target
Block Completion
Build Tools
Caliber
Class Completion
Class Explorer
Code Browsing
Code Completion
Code Editor
Code Explorer
Code Parameters
Code Templates
Compiler Message Window
Deployment Manager
Dialogs
Direct
Docking
File Browser
File Handling
Form Designer
Help
History View
IDE Insight
Memory Issues
Menu Designer
Menus
Module Manager
Multi-Monitor Support
Object Inspector
Object TreeView
Open Tools API
Packages
Performance
Printing
Project Explorer(old Object Browser)
Project Management
Refactoring
Repository
Save Desktop
Search
Start Page
Starteam
Startup/Shutdown
Structure Pane
System Resources
ToDoList
Tool Palette
Toolbars/Status Line
Translation Tools
Unit Testing
Version Control
VersionInfo
Views
Visual Form Inheritance
Workgroup(PVCS)
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/IDE/Class Completion
[ Add a report in this area ]
Report #:
88011
Status:
Open
Class Completion creates duplicate methods
Project:
Delphi
Build #:
15.0.3890.34076
Version:
15.0
Submitted By:
Thomas Mueller
Report Type:
Suggestion / Enhancement Request
Date Reported:
9/13/2010 5:42:07 AM
Severity:
Infrequently encountered problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All versions
Internal Tracking #:
280407
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:
5
Description
If a method declaration like this
procedure a(b: dword);
with an implementation like this:
procedure TMyClass.a(b: cardinal);
begin
end;
exists, class completion works as expected: It does nothing.
But if you add an overload directive to the declaration and press Shift+Ctrl+c, class completion creates an additional declaration with b: cardinal and an implementation with b: dword.
Steps to Reproduce:
Create a unit with this code:
unit Unit1;
interface
uses
Windows;
type
tmyclass = class
private
procedure a(b: dword); overload;
end;
implementation
procedure tmyclass.a(b: Cardinal);
begin
end;
end.
This code is correct and compiles because DWord=Cardinal.
Now press Shift+Ctrl+c. The IDE will add one new declaration and one new implementation like this:
unit Unit1;
interface
uses
Windows;
type
tmyclass = class
private
procedure a(b: dword); overload;
procedure a(b: Cardinal);
end;
implementation
procedure tmyclass.a(b: Cardinal);
begin
end;
procedure tmyclass.a(b: dword);
begin
end;
end.
This code does not compile because it contains two erros:
1. The second declaration does not have the overload directive
2. Since dword = cardinal the overload is not allowed.
Workarounds
None
Attachment
None
Comments
None
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us