Helper types cause CodeTools access violation
Original Reporter info from Mantis: sysrpl
-
Reporter name: Anthony Walter
Original Reporter info from Mantis: sysrpl
- Reporter name: Anthony Walter
Description:
CodeTools now provides code insight on help type methods and properties, but it will throw and access violation when insight attempts to show a second time.
After the first identifier it is okay:
http://cache.getlazarus.org/images/type-helper-okay.png
But after the second identifier it bombs:
http://cache.getlazarus.org/images/type-helper-error.png
Steps to reproduce:
Create a new project and add add a new unit such as HelperTest. In the form unit try to type "'Hello'.Twice." and press Ctrl + Space. You will receive an access violation.
unit HelperTest;
{$mode delphi}
interface
{ TStringHelper }
type
TStringHelper = record helper for string
private
function GetTheLength: Integer;
public
function Twice: string;
function Thrice: string;
property TheLength: Integer read GetTheLength;
end;
implementation
function TStringHelper.GetTheLength: Integer;
begin
Result := Length(Self)
end;
function TStringHelper.Twice: string;
begin
Result := Self + Self;
end;
function TStringHelper.Thrice: string;
begin
Result := Self + Self + Self;
end;
end.
Mantis conversion info:
- Mantis ID: 28860
- OS: Ubuntu
- OS Build: 14.04 64 bit
- Build: rev 49901
- Platform: Linux
- Version: 1.5 (SVN)
- Fixed in revision: 50085 (#17401566)