"Constraint override" in inner class (identifier idents no member)
Original Reporter info from Mantis: hnb
-
Reporter name: Maciej Izak
Original Reporter info from Mantis: hnb
- Reporter name: Maciej Izak
Description:
FPC in some way override constraint in inner class (Error: identifier idents no member "C"). More details in code.
probably related to:
http://bugs.freepascal.org/view.php?id=25917
---
{$APPTYPE CONSOLE}
{$MODE DELPHI}
type
TX = class
public const
C = 1;
end;
TA<T1, T2> = class
end;
TB<T1, T2> = class
private
type
T3 = record end;
TC = class(TA<T1, TObject>) // TObject ovverride T2 from TB!
public
procedure Foo;
end;
procedure Foo;
end;
procedure TB<T1, TX>.TC.Foo;
var
L: TB<T1, T2>.T3;
begin
end;
procedure TB<T1, T2>.Foo;
begin
WriteLn(T2.C); // Error: identifier idents no member "C"
end;
var
x: TB<Pointer, TX>;
Mantis conversion info:
- Mantis ID: 25918
- Version: 2.7.1
- Monitored by: » Hixie (Ian Hickson)