summaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
authorpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-12-12 16:50:29 +0000
committerpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-12-12 16:50:29 +0000
commit3628a25b9c5e590d4b7188f2682fe7bfc5d4a80c (patch)
tree9a443900500e54895febdd10784a74bf0cfb8d77 /ide
parentded5ce4125cffc629e12b07f3694fd4e00bb5553 (diff)
downloadfpc-3628a25b9c5e590d4b7188f2682fe7bfc5d4a80c.tar.gz
+ Add overloaded Testne function in test1 unit
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@19834 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'ide')
-rw-r--r--ide/test.pas5
-rw-r--r--ide/test1.pas28
2 files changed, 33 insertions, 0 deletions
diff --git a/ide/test.pas b/ide/test.pas
index 309fc3cc9f..20903e3028 100644
--- a/ide/test.pas
+++ b/ide/test.pas
@@ -201,5 +201,10 @@ BEGIN
dispose(X);
{ for i:=1 to 99 do
Writeln('Line ',i); }
+ if (TestOne<>1) or (TestOne(5)<>5) or (TestOne('6')<>6) then
+ begin
+ Writeln('Error while testing TestOne function overloads');
+ RunError(200);
+ end;
Halt(4);
END.
diff --git a/ide/test1.pas b/ide/test1.pas
index 675b5c4cd5..233e2b1f27 100644
--- a/ide/test1.pas
+++ b/ide/test1.pas
@@ -1,9 +1,37 @@
unit test1;
+{$mode objfpc}
+
{ dummy unit for test of dbx stabs info PM }
interface
+function TestOne : longint;
+function TestOne(val : longint) : longint; overload;
+function TestOne(val : string) : longint; overload;
+
+
implementation
+function TestOne : longint;
+begin
+ result:=1;
+end;
+
+function TestOne(val : longint) : longint; overload;
+begin
+ result:=val;
+end;
+
+function TestOne(val : string) : longint; overload;
+var
+ value, error : longint;
+begin
+ system.val(val,value,error);
+ if error=0 then
+ result:=value
+ else
+ result:=-1;
+end;
+WWWWW
end.