summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw12404.pp
blob: 9fd711f80643c3418a3fe23ce004e1a7e7afe88d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ %norun }

{$mode objfpc}
{$h+}
{$inline on}
unit tw12404;

interface

Type
  TMyClass = Class(TObject)
  Private
    FPos : integer;
    FChar : PChar;
    Function MyFunc : Char; inline;
    Function MyOtherFunction : Integer;
  end;

implementation

Function TMyClass.MyFunc : Char; inline;

begin
  Inc(FPos);
  Inc(FChar);
  Result:=FChar^;
end;

Function TMyClass.MyOtherFunction : Integer;

Var
  C : Char;

begin
  C:=MyFunc;
end;

end.