View Issue Details

IDProjectCategoryView StatusLast Update
0025597FPCCompilerpublic2015-01-08 20:58
ReporterMaciej Izak Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Product Version2.7.1 
Summary0025597: Forbidden word - field name "hash" with "with" keyword and generics usage.
DescriptionOne of strangest error I have ever seen:

{$MODE DELPHI}

type
  TA<T> = class
    F: T;
  end;

  TB<T> = class
    type
      TC = record
        hash: array[boolean] of T;
      end;

    var
      A: TA<TC>;

    procedure Foo;
  end;

{ TB<T> }

procedure TB<T>.Foo;
begin
  with A.F do
    if hash[false] = 0 then // Error: Illegal qualifier
  // for any field name different than hash (in struct TC) all is ok... very strange error.

  // if A.F.hash[false] = 0 then // <- ok
end;
Tagsgenerics
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Relationships

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

Activities

Maciej Izak

2014-01-25 11:57

reporter  

r02.lpr (510 bytes)

Sven Barth

2014-06-08 17:27

manager   ~0075573

Would you please retest? I can not reproduce anymore in revision 27899.

Regards,
Sven

Maciej Izak

2015-01-08 18:34

reporter   ~0080221

The next eliminated bug! :D

Sven Barth

2015-01-08 20:58

manager   ~0080225

Since I couldn't reproduce it I wouldn't say fixed... We'll never know what went wrong there :/

Please close.

Regards,
Sven

Issue History

Date Modified Username Field Change
2014-01-25 11:57 Maciej Izak New Issue
2014-01-25 11:57 Maciej Izak File Added: r02.lpr
2014-01-25 11:58 Maciej Izak Tag Attached: generics
2014-06-08 17:27 Sven Barth Note Added: 0075573
2014-06-08 17:27 Sven Barth Assigned To => Sven Barth
2014-06-08 17:27 Sven Barth Status new => feedback
2015-01-06 14:35 Sven Barth Relationship added related to 0027206
2015-01-08 18:34 Maciej Izak Note Added: 0080221
2015-01-08 18:34 Maciej Izak Status feedback => assigned
2015-01-08 20:58 Sven Barth Note Added: 0080225
2015-01-08 20:58 Sven Barth Status assigned => resolved
2015-01-08 20:58 Sven Barth Resolution open => unable to reproduce