View Issue Details

IDProjectCategoryView StatusLast Update
0029745FPCCompilerpublic2016-03-17 10:44
ReporterBart Broersma Assigned ToSven Barth  
Status closedResolutionfixed 
Product Version3.0.0 
Fixed in Version3.1.1 
Summary0029745: Codepage + {$H+} + ClassHelper + Initialized string variable gives: Error: identifier idents no member ...
DescriptionReported by Silvio Cl├ęcio in fpc-pascal mailinglist

If your program has a {$codepage xxx} and you have a classhelper and use {$H+} and you have an initiaize string variable (local or global) compiling will fail with: Error: identifier idents no member ...
Steps To Reproduce{$apptype console}
{$ifdef fpc}
{$mode objfpc}
{$codepage utf8}

uses Classes;

  TFoo = class helper for TStream
    procedure Bar;

  procedure TFoo.Bar;

  s: string = '';
  m: TStream;
  m := TMemoryStream.Create;

C:\Users\Bart\LazarusProjecten\ConsoleProjecten>fpc test.pas
Free Pascal Compiler version 3.0.0 [2015/11/16] for i386
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling test.pas
test.pas(26,7) Error: identifier idents no member "Bar"
test.pas(32) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: C:\devel\fpc\3.0.0\bin\i386-Win32\ppc386.exe returned an error exitcode
Additional InformationThis issue goes away if you do any of these things:
- remove {$H+}
- remove {$codepage xxx} (the issue does not depend on what codepage is specified)
- remove the initialization of variable "s"

Note: the issue also happens when "s" is a local varaiable in a procedure.
TagsNo tags attached.
Fixed in Revision33214
Attached Files


Sven Barth

2016-03-10 20:44

manager   ~0090869

Please test and close if okay.


Bart Broersma

2016-03-17 10:44

reporter   ~0091149

According to the original reporter on ML (Silvio) this is fixed.

Issue History

Date Modified Username Field Change
2016-02-27 14:15 Bart Broersma New Issue
2016-03-10 00:00 Sven Barth Assigned To => Sven Barth
2016-03-10 00:00 Sven Barth Status new => assigned
2016-03-10 20:44 Sven Barth Fixed in Revision => 33214
2016-03-10 20:44 Sven Barth Note Added: 0090869
2016-03-10 20:44 Sven Barth Status assigned => resolved
2016-03-10 20:44 Sven Barth Fixed in Version => 3.1.1
2016-03-10 20:44 Sven Barth Resolution open => fixed
2016-03-17 10:44 Bart Broersma Note Added: 0091149
2016-03-17 10:44 Bart Broersma Status resolved => closed