View Issue Details

IDProjectCategoryView StatusLast Update
0025606FPCCompilerpublic2015-01-06 14:12
ReporterMaciej Izak Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.7.1 
Fixed in Version3.0.0 
Summary0025606: Illegal qualifier for type initialization by const in type/record helper
DescriptionIllegal qualifier for type initialization by const in type/record helper:

---program---
program r11;

{$MODE DELPHI}

type
  TValueInt32Helper = record helper for Int32
  const
    C: Int32 = 0;
  end;

var
  I: Int32 = Int32.C; // Error: Illegal qualifier
begin
end.
TagsNo tags attached.
Fixed in Revision29176
FPCOldBugId
FPCTarget
Attached Files

Relationships

related to 0027206 resolvedSven Barth [Patch] Christmas gift by FreeSparta : Generics.Collections 

Activities

Maciej Izak

2014-01-25 13:34

reporter  

r11.lpr (168 bytes)

Sven Barth

2014-04-11 18:16

manager   ~0074320

While there is indeed a bug regarding the handling of constants inside helpers your code is nevertheless wrong: you can not use typed constants to initialize another constant or variable (just change your record helper to a normal record and change "Int32.C" to "TValueInt32Helper.C" to see what I mean).

Regards,
Sven

Sven Barth

2014-11-28 23:06

manager   ~0079458

Please test and close if okay.

Regards,
Sven

Issue History

Date Modified Username Field Change
2014-01-25 13:34 Maciej Izak New Issue
2014-01-25 13:34 Maciej Izak File Added: r11.lpr
2014-04-11 18:16 Sven Barth Note Added: 0074320
2014-04-11 18:16 Sven Barth Assigned To => Sven Barth
2014-04-11 18:16 Sven Barth Status new => assigned
2014-11-28 23:06 Sven Barth Fixed in Revision => 29176
2014-11-28 23:06 Sven Barth Note Added: 0079458
2014-11-28 23:06 Sven Barth Status assigned => resolved
2014-11-28 23:06 Sven Barth Fixed in Version => 2.7.1
2014-11-28 23:06 Sven Barth Resolution open => fixed
2015-01-06 14:12 Sven Barth Relationship added related to 0027206