crash when overriding non existing function returning a class
Original Reporter info from Mantis: BeniBela @benibela
-
Reporter name: Benito van der Zander
Original Reporter info from Mantis: BeniBela @benibela
- Reporter name: Benito van der Zander
Description:
Compiling this program:
program test2;
{$mode objfpc}{$H+}
type
TA = class()
// class function x: TAClass; virtual;
end;
TAClass = class of TA;
TB = class(TA)
function x: TAClass; override;
end;
begin
end.
causes fpc to crash:
Free Pascal Compiler version 2.6.2 [2013/03/23] for x86_64
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling test2.pas
test2.pas(7,12) Error: Type identifier expected
test2.pas(7,12) Error: class type expected, but got "&LtPos;erroneous type>"
Fatal: Compilation aborted
An unhandled exception occurred at $0000000000478170 :
EAccessViolation : Access violation<br/>
$0000000000478170
$0000000000550E62
$0000000000534648
$000000000056F5A4
$000000000042380F
Error: /usr/local/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
Mantis conversion info:
- Mantis ID: 24866
- OS: Debian
- OS Build: wheezy
- Build: 2.6.2 [2013/03/23] for x86_64
- Platform: amd64
- Version: 2.6.2
- Fixed in version: 3.0.0