View Issue Details

IDProjectCategoryView StatusLast Update
0024064FPCCompilerpublic2013-08-13 11:20
ReporterMaciej IzakAssigned ToSven Barth 
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionwon't fix 
Product Version2.7.1Product Build 
Target VersionFixed in Version 
Summary0024064: Global Generic template references static symtable for procedure
DescriptionFor simple attached code I have error: Global Generic template references static symtable
Tagsgenerics
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files
  • unit1.pas (209 bytes)
    unit Unit1;
    
    {$mode delphi}
    
    interface
    
    type
      TA<T> = class
      public
        procedure foo;
      end;
    
    implementation
    
    procedure Boo;
    begin
    end;
    
    procedure TA<T>.foo;
    begin
      Boo;
    end;
    
    end.
    
    unit1.pas (209 bytes)

Relationships

related to 0021310 assignedSven Barth Global Generic template references static symtable 

Activities

Maciej Izak

2013-03-17 12:58

reporter  

unit1.pas (209 bytes)
unit Unit1;

{$mode delphi}

interface

type
  TA<T> = class
  public
    procedure foo;
  end;

implementation

procedure Boo;
begin
end;

procedure TA<T>.foo;
begin
  Boo;
end;

end.
unit1.pas (209 bytes)

Sven Barth

2013-08-13 11:17

manager   ~0069362

This is by design and Delphi compatible. All identifiers that a generic uses must be available in the interface section of the unit or be part of the generic itself.

Note: Delphi allows untyped ordinal or floating point constants to be defined in the implementation section, we do currently not allow that and I don't know yet whether I'll be able to solve that at all. See 0021310

Regards,
Sven

Issue History

Date Modified Username Field Change
2013-03-17 12:58 Maciej Izak New Issue
2013-03-17 12:58 Maciej Izak File Added: unit1.pas
2013-03-19 12:16 Maciej Izak Tag Attached: generics
2013-08-13 11:17 Sven Barth Note Added: 0069362
2013-08-13 11:17 Sven Barth Status new => resolved
2013-08-13 11:17 Sven Barth Resolution open => won't fix
2013-08-13 11:17 Sven Barth Assigned To => Sven Barth
2013-08-13 11:20 Sven Barth Relationship added related to 0021310