summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw7179.pp
blob: 9284eda393343970f551906451c9ac2722eb298d (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
{ %opt=-Seh -vh }

{$mode delphi}
program TestMismatch;

type
  TTestClass = class(TObject)
  public
    procedure AProc(AValue : Single);
  end;

procedure TTestClass.AProc(AValue : Single);
begin
  WriteLn(AValue);
end;

var
  AnObj : TTestClass;
  ASingle : Single;
  
begin
  AnObj := TTestClass.Create;
  ASingle := 1;
  AnObj.AProc(ASingle * 2); //Does not generate warning
  AnObj.AProc(ASingle * 2.0); //Generates warning with -Cr or -vh
end.