overloaded methods give a strange compiler error lazarus / 64-FPC development ---------------------------------------------------------------------- soerensen3 · 2020-07-15 20:44 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. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 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: QuoteCompile 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. ---------------------------------------------------------------------- Bart · 2020-07-15 20:48 The colon ( after the last overload needs to be a semicolon (. So, it's just a typo. Bart ---------------------------------------------------------------------- soerensen3 · 2020-07-15 20:53 It took me only 2 days to update both my lazarus and fpc because fpcupdeluxe was refusing to work and the packages of arch for lazarus seem to be broken. Also the AUR package of Lazarus did not compile. And someone else finds the error in a matter of seconds. I should probably get more sleep.  Thanks bye the way! ---------------------------------------------------------------------- 440bx · 2020-07-15 21:21 Quote from: soerensen3 on July 15, 2020, 10:44:02 pmCode: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i       function Expect( ATokenKind: TTokenKind; AText: String ): Boolean; overload: The error messages: Quoteunit2.pas(16,82) Error: Fields cannot appear after a method or property definition, start a new visibility section first Quote from: soerensen3 on July 15, 2020, 10:53:50 pmAnd someone else finds the error in a matter of seconds. I should probably get more sleep.  Probably ... if you look at that error message on line 16 it point to column 82 which is the colon, that's the clue.  Sometimes it takes looking at the statement and the compiler message for a few seconds before finally figuring out what the problem really is.