View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038070 | FPC | Compiler | public | 2020-11-12 14:35 | 2020-11-15 17:30 |
Reporter | Marco van de Voort | Assigned To | Florian | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.2.0 | ||||
Fixed in Version | 3.2.1 | ||||
Summary | 0038070: Delphi mode generic class with class constraint isn't allowed to be nilled. | ||||
Description | Delphi allows to nil generic types if they are declared with class constraint. | ||||
Steps To Reproduce | {$mode delphi} type TLockedPool<t:class,constructor> = class field : T; procedure xx; end; procedure tlockedpool<t>.xx; begin field:=nil; // allowed in Delphi, not in FPC end; | ||||
Additional Information | workaround: a viable (and probably even better) is to assign default(T), but this is a compatibility issue. | ||||
Tags | generics | ||||
Fixed in Revision | 47421 | ||||
FPCOldBugId | |||||
FPCTarget | - | ||||
Attached Files |
|
|
With trunk it works, not sure what needs to be merge though. |
|
So I did remember correctly that you fixed that already! It's revision 39934 by the way, the fix for 0034037. ;) |
|
Sorry guys, I noticed in a project for work, and that is of course using fixes branch. |
|
Thanks Sven for the revision, I merged it. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-12 14:35 | Marco van de Voort | New Issue | |
2020-11-13 15:07 | Sven Barth | Tag Attached: generics | |
2020-11-14 23:37 | Florian | Note Added: 0126950 | |
2020-11-15 12:45 | Sven Barth | Note Added: 0126953 | |
2020-11-15 12:46 | Sven Barth | Note Edited: 0126953 | View Revisions |
2020-11-15 13:43 | Marco van de Voort | Note Added: 0126955 | |
2020-11-15 15:17 | Florian | Assigned To | => Florian |
2020-11-15 15:17 | Florian | Status | new => resolved |
2020-11-15 15:17 | Florian | Resolution | open => fixed |
2020-11-15 15:17 | Florian | Fixed in Version | => 3.2.1 |
2020-11-15 15:17 | Florian | Fixed in Revision | => 47421 |
2020-11-15 15:17 | Florian | FPCTarget | => - |
2020-11-15 15:17 | Florian | Note Added: 0126959 | |
2020-11-15 15:17 | Florian | Product Version | 3.3.1 => 3.2.0 |
2020-11-15 17:30 | Sven Barth | Relationship added | duplicate of 0034037 |