[fpc-pascal] Codepage + class helper raises "Error identifier idents no member ..."

Sven Barth pascaldragon at googlemail.com
Sat Feb 27 09:41:11 CET 2016


Am 26.02.2016 20:31 schrieb "silvioprog" <silvioprog at gmail.com>:
>
> Hello,
>
> Consider the following code:
>
> === code ===
>
> program project1;
>
> {$mode objfpc}{$H+}
> //{$codepage utf8}
>
> uses Classes;
>
> type
>   TFoo = class helper for TStream
>   public
>     procedure Bar;
>   end;
>
>   procedure TFoo.Bar;
>   begin
>   end;
>
> var
>   s: string = '';
>   m: TStream;
> begin
>   m := TMemoryStream.Create;
>   try
>     m.Bar;
>   finally
>     m.Free;
>   end;
> end.
>
> === /code ===
>
> It compiles fine, but when you uncomment the line "//{$codepage utf8}",
it raises:
>
> 'Error: identifier idents no member "Bar"'
>
> If you confirm it as bug I can open a issue on bugtracker.

That definitely shouldn't be the case. Please report.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160227/ad68e91e/attachment.html>


More information about the fpc-pascal mailing list