123456789101112131415161718192021222324252627282930313233343536373839404142 |
- {$ifdef fpc}
- {$mode delphi}
- {$endif fpc}
- {$ifdef FPC_COMP_IS_INT64}
- type
- comp = double;
- {$endif FPC_COMP_IS_INT64}
- procedure test(a: double); overload;
- begin
- writeln('double called instead of char');
- writeln('XXX')
- end;
- procedure test(a: char); overload;
- begin
- writeln('char called instead of double');
- halt(1)
- end;
- var
- v: variant;
- x: double;
- y: char;
- begin
- try
- v := x;
- test(v);
- except
- on E : TObject do
- halt(1);
- end;
- try
- v := y;
- test(v);
- except
- on E : TObject do
- writeln('VVV');
- end;
- end.
|