Incompatibility of procedural types and static class methods in "objfpc" mode
Original Reporter info from Mantis: kazalex
-
Reporter name: Kazantsev Alexey
Original Reporter info from Mantis: kazalex
- Reporter name: Kazantsev Alexey
Description:
Error: Incompatible types: got "&LtPos;class method type of procedure(const ShortString) of object;Register>" expected "&LtPos;procedure variable type of procedure(const ShortString);Register>"
Steps to reproduce:
program fpc_procedural_type_bug;
{$mode objfpc}
type
tproc = procedure(const aparam : string);
tobj = class
class procedure proc(const aparam : string); static;
end;
var
p : tproc;
begin
p := @tobj.proc;
end.
Mantis conversion info:
- Mantis ID: 27414
- Build: 29611
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 32216 (#8087389f)
- Monitored by: » luizamerico (Luiz Americo), » silvioprog (silvioprog), » kazalex (Kazantsev Alexey)