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.is] QualityCentral 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
QCScraper ClientDataSet XML dump results – archive of qc.embarcadero.com « The Wiert Corner – irregular stream of stuff said
[…] QualityCentral Report 95543: An overloaded routine cannot be assigned to the method reference […]