The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,262 other subscribers

QualityCentral Report 95543: An overloaded routine cannot be assigned to the method reference

Posted by jpluimers on 2017/12/20

Since I bumped into this while qc.embarcadero.com was down, and quality.embarcadero.com is not publicly indexed and requires an account to be able to manually search:

I’m not sure how long qc.embarcadero.com will be up again, so if people can help archiving these entries in the WayBack machine: please indicate how you can help.

Thanks a lot!

I bumped into [Archive.is] QualityCentral Report 110364: Open Interface methods are not assignable to anonymous method variable which is related to [WayBack/Archive.isQualityCentral Report 95543: An overloaded routine cannot be assigned to the method reference.

The former is now tracked as RSP-13007, but I could not find back the latter (JIRA search keeps insisting it cannot find 95543).

The latter is the actual problem I was having: this is code that does not work:

{ Expected: the test case gets compiled.
  Actual: E2010 is issued.
}

procedure foo; overload;
begin

writeln('FAIL')
end;

procedure foo(const c: char); overload;
begin

writeln('PASS')
end;

var f: procedure (const c: char);
type T = reference to procedure (const c: char);
var r: T;
begin
{$apptype console}

f := foo;
// correctly picks the proper version

f('1');


r := foo;
// E2010 Incompatible types: 'T' and 'Procedure'

r('2')
end.

–jeroen

 

 

 

One Response to “QualityCentral Report 95543: An overloaded routine cannot be assigned to the method reference”

  1. […] QualityCentral Report 95543: An overloaded routine cannot be assigned to the method reference […]

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.