fpc/tests/webtbs/tw26615.pp
svenbarth 244ac12794 Fix for Mantis .
htypechk.pas, tcallcandidates:
  * collect_overloads_in_struct: we need to check the deftyp of the extended def for record- or objectdef, not the deftyp of the helper which will always be objectdef anyway.

+ added test

git-svn-id: trunk@28572 -
2014-09-01 07:18:02 +00:00

30 lines
421 B
ObjectPascal

{ %NORUN }
program tw26615;
{$MODE OBJFPC}{$H+}
{$MODESWITCH TYPEHELPERS}
uses
sysutils;
type
TStringHelper = type helper for UnicodeString
class function Cr(AStr: UnicodeString): UnicodeString; static; overload;
end;
class function TStringHelper.Cr(AStr: UnicodeString): UnicodeString;
begin
Result := '#'+AStr;
end;
var
us: UnicodeString;
begin
us := UnicodeString.Cr('a');
writeln(us);
end.