Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-11

Bug in code completion

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

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.

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 19 lines
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

Reply by email