codetools error lazarus / 9-Editor ---------------------------------------------------------------------- tr_escape · 2018-12-10 08:33 Hello Lazarus team, Some of my projects giving codetools error about end of source but also compiler is compiling. After restart of Lazarus it is working normally but if I use to look my function's detail by CTRL+SHIFT+SPACE it is jumping to one of my function. What can be problem? Additional info: If I tidy of my code by CTRL+D it is working normally again. Lazarus 2.1.0 r59769M FPC 3.3.1 x86_64-win64-win32/win64 ---------------------------------------------------------------------- JuhaManninen · 2018-12-10 08:52 Quote from: tr_escape on December 10, 2018, 09:33:15 amIf I tidy of my code by CTRL+D it is working normally again. That is strange. Usually Codetools can handle whitespace and other formatting correctly. Can you reproduce it systematically? Please upload a minimal demo unit or project. ---------------------------------------------------------------------- Cyrax · 2018-12-10 09:33 Quote from: tr_escape on December 10, 2018, 09:33:15 amHello Lazarus team, Some of my projects giving codetools error about end of source but also compiler is compiling. After restart of Lazarus it is working normally but if I use to look my function's detail by CTRL+SHIFT+SPACE it is jumping to one of my function. What can be problem? Additional info: If I tidy of my code by CTRL+D it is working normally again. Lazarus 2.1.0 r59769M FPC 3.3.1 x86_64-win64-win32/win64 You need to rebuild FPC code cache in Lazarus. Go and click on Tools->Rescan FPC Source Directory  menu item. ---------------------------------------------------------------------- tr_escape · 2018-12-10 10:21 Quote from: JuhaManninen on December 10, 2018, 09:52:26 amQuote from: tr_escape on December 10, 2018, 09:33:15 amIf I tidy of my code by CTRL+D it is working normally again. That is strange. Usually Codetools can handle whitespace and other formatting correctly. Can you reproduce it systematically? Please upload a minimal demo unit or project. Actually I copied same functions from my original project as empty and autocreated by IDE. I added a button on the form and I wrote only : var   a,b,c: When I press the CRTL+SHIFT+Space it gave me : unit1.pas(42,4) Error: End of source not found. message. I also tried to scan fpc sources but not worked. Note: This edition downloaded by fpcupdeluxe. I have got another edition of lazarus "Lazarus 2.0.0RC2 r59373 FPC 3.0.4 i386-win32-win32/win64" it is working correctly. 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 Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls; type   { TForm1 }   TForm1 = class(TForm)    Button1: TButton;    procedure Button1Click(Sender: TObject);  private   public     procedure SaveIniPwd(section,ident,valstr:String);    function LoadIniPwd(section,ident,defstr:String):String;    function CheckIniUsr(section:String):Boolean;     function checkUser(var usr: Integer; var pwd: String): Integer;   end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject);begin  // end; procedure TForm1.SaveIniPwd(section, ident, valstr: String);var  a,b,c:begin  // end; function TForm1.LoadIniPwd(section, ident, defstr: String): String;begin  //end; function TForm1.CheckIniUsr(section: String): Boolean;begin  //end; function TForm1.checkUser(var usr: Integer; var pwd: String): Integer;begin  //end;   end. ---------------------------------------------------------------------- JuhaManninen · 2018-12-11 00:47 I cannot reproduce. I only get  Code: [Select]unit1.pas(47,1) Error: identifier expected, but begin foundwhich is correct. ---------------------------------------------------------------------- tr_escape · 2018-12-11 05:23 Quote from: JuhaManninen on December 11, 2018, 01:47:46 amI cannot reproduce. I only get  Code: [Select]unit1.pas(47,1) Error: identifier expected, but begin foundwhich is correct. It is strange I added same project in the attach as project1.zip. So I can produce same conditons order by: 1- I removed that Integer defination from the code as: 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 procedure TForm1.SaveIniPwd(section, ident, valstr: String);var  a,b,c : Integer;begin   2- 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 procedure TForm1.SaveIniPwd(section, ident, valstr: String);var  a,b,c : begin  3- I pressed the CTRL+SPACE only and it is happening. but if there is no any space between a,b,c and colon ( : )  it is working normally. Like as: 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 ..var  a,b,c:Integer;...