View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031528 | FPC | Compiler | public | 2017-03-13 00:47 | 2020-12-22 13:51 |
Reporter | Benito van der Zander | Assigned To | Sven Barth | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | 3.1.1 | ||||
Fixed in Version | 3.3.1 | ||||
Summary | 0031528: pointer to advanced record methods | ||||
Description | Pointers to methods of advanced records should behave like pointers to class methods. Currently they do not seem to be compatible to any procedure pointers. | ||||
Steps To Reproduce | E.g. type TTest = record procedure a; end; var r: TTest; a: procedure of object; p: procedure; begin p := @r.a; a := @r.a; Both assignments are rejected: project1.lpr(24,8) Error: Incompatible types: got "PROJECT1.<procedure variable type of procedure;Register>" expected "PROJECT1.<procedure variable type of procedure;Register>" project1.lpr(25,8) Error: Incompatible types: got "<procedure variable type of procedure;Register>" expected "<procedure variable type of procedure of object;Register>" Yet you can do TMethod(a).Code := @r.a; TMethod(a).Data := @r; | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 47826 | ||||
FPCOldBugId | |||||
FPCTarget | - | ||||
Attached Files |
|
duplicate of | 0038238 | closed | Sven Barth | Pointers to record methods don't seem to work |
|
The method variable should now work since r47826. Procedure variables are not allowed. Please test and close if okay (and thank you for reminding me about this report ;) ). |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-03-13 00:47 | Benito van der Zander | New Issue | |
2020-12-22 13:51 | Sven Barth | Assigned To | => Sven Barth |
2020-12-22 13:51 | Sven Barth | Status | new => resolved |
2020-12-22 13:51 | Sven Barth | Resolution | open => fixed |
2020-12-22 13:51 | Sven Barth | Fixed in Version | => 3.3.1 |
2020-12-22 13:51 | Sven Barth | Fixed in Revision | => 47826 |
2020-12-22 13:51 | Sven Barth | FPCTarget | => - |
2020-12-22 13:51 | Sven Barth | Note Added: 0127761 | |
2020-12-22 13:51 | Sven Barth | Relationship added | duplicate of 0038238 |