specialize type inside a generic class leads to confusing error messages
Original Reporter info from Mantis: Hixie
-
Reporter name: Ian Hickson
Original Reporter info from Mantis: Hixie
- Reporter name: Ian Hickson
Description:
The following program gives the following highly unhelpful error message:
test.pas(10,36) Fatal: Syntax error, ";" expected but ">" found
It's especially unhelpful because if you add a semicolon where it suggests, you get:
test.pas(10,36) Fatal: Syntax error, ">" expected but ";" found
{$MODE OBJFPC} { -*- text -*- }
program Test;
type
generic Test1<T> = class end;
generic Test2<T> = class
type
Test3 = specialize Test1<T>;
end;
Test4 = specialize Test2<Integer>;
begin
end.
Mantis conversion info:
- Mantis ID: 17184
- OS: Linux
- Platform: x86_64
- Version: 2.4.0
- Fixed in version: 2.6.0