[Lazarus] Bug in code completion

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Nov 16 18:24:19 CET 2014


On Sun, 16 Nov 2014 14:14:14 +0100 (CET)
Michael Van Canneyt <michael at freepascal.org> wrote:

> 
> Hi,
> 
> I am writing a unit test. I type the following:
> 
>   AssertException('Cannot set packetrecords when sqoDisconnected is active',EDatabaseError, at TrySetPacketRecords);
> 
> I position the cursor on the @TrySetPacketRecords, and press code completion key. 
> (so Lazarus would create the TrySetPacketRecords method)
> 
> Nothing happens, except some error in the debug log:
> 
>    CompleteLocalIdentifierByParameter Procedure has less than 3 parameters
> ### TCodeToolManager.HandleException: "there is no completion for this code"
> 
> This is not correct: there is an overloaded variant of AssertException that has 3 parameters.
> (shown by the tooltip, BTW)
> 
> Probably an oversight.

The parameter @TrySetPacketRecords is not defined,
therefore the standard compare function returns for both overloads
"maybe". It needs a heuristic to choose the right candidate. 

Please create a bug report.

Mattias




More information about the Lazarus mailing list