type alias devirtualizes constructors
Original Reporter info from Mantis: BBaz @basile.b
-
Reporter name:
Original Reporter info from Mantis: BBaz @basile.b
- Reporter name:
Description:
When an distinct alias to a class type is declared, the new class constructors are not virtual anymore.
This only happens on constructors and not on procedures or functions, which remain virtual despite of being in a new type.
If this behavior is not a bug it needs to be documented in the manual.
Steps to reproduce:
compile the folllowing program:
---
program Project1;
{$Mode objfpc}
type
TFoo = class
constructor create; virtual;
end;
TBar = type TFoo;
TBaz = class(TBar)
constructor create; override;
end;
constructor TFoo.create;
begin end;
constructor TBaz.create;
begin end;
begin
end.
Mantis conversion info:
- Mantis ID: 29367
- Build: [2015/11/20]
- Version: 3.0.0
- Fixed in version: 3.1.1
- Fixed in revision: 37927 (#ae087b92)