[Lazarus] Language additions breaking IDE

Anthony Walter sysrpl at gmail.com
Fri Aug 26 07:08:18 CEST 2011


Hello, I just joined this mailing list to mention an issue I found in
Lazarus.

General description of the problem: Using new language features make working
with Lazarus quite difficult.

The following wiki link outlines some of the new language features to the
FPC bringing in compatibility with Delphi.

http://wiki.freepascal.org/FPC_New_Features_Trunk#Generic_records.2C_arrays_and_procedural_types

Using the new generic language below in Lazarus causes the IDE to generate
continual Lazarus parser error messages in the message window. When these
errors occur, Lazarus opens and switches to the offending file, highlighting
the line such as "function GetEnumerator: IEnumerator<T>;". These errors
messages and switching to the offending file occur anytime code insight is
requested (ctrl+space) or whenever the object inspector row changes on the
events tabs. Additionally you cannot add events to components when any unit
links to a unit with offending code (example):

{$mode delphi}

type
  IEnumerable<T> = interface
    function GetEnumerator: IEnumerator<T>; // parser breaks here
continually
  end;

/path/unitname.pas(75,41) Error: expected end., but T found

The problem is that Lazarus's internal parser does not recognize the < in
the line with "function GetEnumerator: IEnumerator<T>;" as a valid token,
even though the code compiles with FPC 2.7.1 (trunk version) and {$mode
delphi} perfectly fine.

Here are the details of my current Lazarus build:

Version: 0.9.31
SVN Revision: 32031
FPC Version: 2.7.1
i386-linux-gtk 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110826/05564913/attachment-0002.html>


More information about the Lazarus mailing list