When I try to compile an application I wrote with trunk laz and fpc I get a strange compiler error which is to my understanding a bug.
I made this minimal example unit.
unit Unit2;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
type
TTokenKind = ( tkSymbol, tkIdentifier );
TParser = class
public
function Expect( ATokenKind: TTokenKind ): Boolean; overload;
function Expect( ATokenKind: TTokenKind; AText: String ): Boolean; overload:
end;
implementation
end.
The error messages:
Compile Project, Target: /home/johannes/tmp/project1: Exit code 1, Errors: 2
unit2.pas(16,82) Error: Fields cannot appear after a method or property definition, start a new visibility section first
unit2.pas(20,1) Fatal: Syntax error, "identifier" expected but "IMPLEMENTATION" found
I'm on Manjaro linux but I don't think it matters.
It happens on both objfpc and delphi mode.