summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw10002.pp
blob: 6b990b5a3c2f6ac7d4c0562a615557345ae0dca5 (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
program OverloadMistaken;

{$ifdef fpc}
{$mode delphi}
{$endif}

type _ulong = Cardinal;

TCCC = class
public
    constructor Create(Size: _ulong=0); overload;
    constructor Create(Buffer: Pointer); overload;
end;

constructor TCCC.Create(Size: _ulong);
begin
	inherited Create;
	WriteLn('TCCC.Create(Size: _ulong) called.');
end;

constructor TCCC.Create(Buffer: Pointer);
begin
 halt(1);
end;

var c: TCCC;
l: longint;
begin
	c := TCCC.Create(20);
	c := TCCC.Create(l);
end.