Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Language/Overloading/Method    [ Add a report in this area ]  
Report #:  79573   Status: Closed
Can not get address of class static overloaded methods
Project:  Delphi Build #:  14.0.3593.25826
Version:    14.0 Submitted By:   Seamour Chen
Report Type:  Basic functionality failure Date Reported:  11/17/2009 3:04:54 AM
Severity:    Commonly encountered problem Last Updated: 4/15/2014 6:50:26 PM
Platform:    All platforms Internal Tracking #:   273676
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: None
Description
The compiling failed if try to get addr of a overloaded class statick method.

for exp:

Tfoo
= class

public


class procedure bar; overload; static;


class procedure bar(V: Integer); overload; static;

end;

there is no way to get the addr of class procedure Tfoo.bar(V: Integer)
Steps to Reproduce:
program GetClassStaticOverloadMethods;

{$APPTYPE CONSOLE}

type

Tfoo
= class

public


class procedure bar; overload; static;


class procedure bar(V: Integer); overload; static;

end;

{ Tfoo }

class procedure Tfoo.bar;
begin
end;

class procedure Tfoo.bar(V: Integer);
begin
end;

var

bar0  : procedure;

bar1  : procedure(V: Integer);
begin

bar0  := Tfoo.bar;

bar1  := Tfoo.bar;
end.

=======================

[DCC Error] E2124 Instance member 'Tfoo.bar' inaccessible here
[DCC Error] E2124 Instance member 'bar' inaccessible here
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01