1{$ifndef bigfile}
2{$ifdef fpc}
3{$mode delphi}
4{$else fpc}
5{$define FPC_HAS_TYPE_EXTENDED}
6{$endif fpc}
7{$endif bigfile}
8
9type
10{$ifdef FPC_COMP_IS_INT64}
11  comp34 = double;
12{$else FPC_COMP_IS_INT64}
13  comp34 = comp;
14{$endif FPC_COMP_IS_INT64}
15procedure test34(a: comp34); overload;
16  begin
17    writeln('comp34 called instead of widestring');
18  end;
19
20procedure test34(a: widestring); overload;
21  begin
22    writeln('widestring called instead of comp34');
23    halt(1)
24  end;
25
26var
27  x34: comp34;
28
29  y34: widestring;
30procedure dotest34;
31var
32  v: variant;
33
34begin
35  try
36    v := x34;
37    test34(v);
38  except
39    on E : TObject do
40      halt(1);
41  end;
42
43  try
44    v := y34;
45    test34(v);
46  except
47    on E : TObject do
48      writeln('VVV');
49  end;
50end;
51
52{$ifndef bigfile} begin
53  dotest34;
54end. {$endif not bigfile}
55