blob: 03c29b6e9df49b54e41b4fe9af8f750abf60ca27 (
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 openarrayoverload;
{$ifdef FPC}{$mode objfpc}{$h+}{$INTERFACES CORBA}{$endif}
{$ifdef mswindows}{$apptype console}{$endif}
uses
{$ifdef FPC}{$ifdef linux}cthreads,{$endif}{$endif}
sysutils;
type
integerarty = array of integer;
booleanarty = array of boolean;
function o2d(const values: array of integer): integerarty;
overload;
begin
result:= nil;
end;
function o2d(const values: array of boolean): booleanarty;
overload;
begin
result:= nil;
end;
var
ar1: integerarty;
begin
ar1:= o2d([127,2,3]); // OK
ar1:= o2d([128,2,3]);
// openarrayoverload.pas(27,8) Error: Can't determine which overloaded function to call
end.
|