compiler crash when trying a workaround for issue 0036843
Original Reporter info from Mantis: BBaz @basile.b
-
Reporter name:
Original Reporter info from Mantis: BBaz @basile.b
- Reporter name:
Description:
compiler crash when compiling some code
Steps to reproduce:
f.pas
---
{$mode objfpc}
program f;
type
TBase = class
procedure func(); virtual;
end;
TDerived1 = class(TBase)
end;
TDerived2 = class(TBase)
end;
generic THelperContainer<T:TBase> = class
type TT = type T;
type THelper = class(TT)
procedure func(); override;
end;
end;
THelperFor1 = class(specialize THelperContainer<TDerived1>);
THelperFor2 = class(specialize THelperContainer<TDerived2>);
procedure TBase.func(); begin end;
procedure THelperContainer.THelper.func(); begin end;
begin
end.
---
--- $ fpc f.pas ---
output
---
Free Pascal Compiler version 3.2.0rc1 [2020/02/25] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling /home/basile/f.pas
f.pas(19,19) Error: There is no method in an ancestor class to be overridden: "func;"
f.pas(26,36) Error: Compilation raised exception internally
Fatal: Compilation aborted
An unhandled exception occurred at $00000000004D1189:
EAccessViolation: Access violation
$00000000004D1189
---
Mantis conversion info:
- Mantis ID: 36847
- Build: 3.2.0rc1 [2020/02/25] for x86_64