View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0021810FPCCompilerpublic2012-04-20 04:492014-02-13 17:47
ReporterAlexander S. Klenin 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version2.7.1Product Build 
Target VersionFixed in Version 
Summary0021810: Class helper methods not not compile with 'inline' modifier
DescriptionThe following code

type
  TC = class
  public
    function G: Integer;
  end;

  TH = class helper for TC
  public
    function G: Integer; inline; // Works without 'inline'
    property P: Integer read G;
  end;

function TC.G: Integer; begin Result := 9; end;
function TH.G: Integer; begin Result := inherited; end;

var
  x: TC;
begin
  x := TC.Create;
  Writeln(x.P);
end.

...gives "Illegal expression" error both in 2.6.0 and trunk.
Steps To ReproduceSee attached program.
TagsNo tags attached.
FPCOldBugId
Fixed in Revision
Attached Files? file icon helper_class_inline.pp [^] (397 bytes) 2012-04-20 04:49

- Relationships

-  Notes
(0073042)
Sergei Gorelkin (developer)
2014-02-13 17:47

Today's trunk compiles the sample without errors, but the procedure is not inlined (and compiler outputs a hint "inherited is not yet supported inside inlined procedures").

- Issue History
Date Modified Username Field Change
2012-04-20 04:49 Alexander S. Klenin New Issue
2012-04-20 04:49 Alexander S. Klenin File Added: helper_class_inline.pp
2014-02-13 17:47 Sergei Gorelkin Note Added: 0073042



MantisBT 1.2.12[^]
Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker