summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorsvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-02-14 16:49:07 +0000
committersvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-02-14 16:49:07 +0000
commite4d0885ab39ac5cc7c01b2e5a989f2a8cee23089 (patch)
tree04aafbb4a6aec535440ee67b54d3c753d3573fcf /tests
parentd78a14192e85dbc2ecbc4fcc44bda0d20b3dd842 (diff)
downloadfpc-e4d0885ab39ac5cc7c01b2e5a989f2a8cee23089.tar.gz
* only resolve a dummy symbol if it is a type symbol (thus truly a dummy symbol)
+ added tests git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@44172 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests')
-rw-r--r--tests/tbs/tb0668a.pp20
-rw-r--r--tests/tbs/tb0668b.pp20
2 files changed, 40 insertions, 0 deletions
diff --git a/tests/tbs/tb0668a.pp b/tests/tbs/tb0668a.pp
new file mode 100644
index 0000000000..9c21d6bc2c
--- /dev/null
+++ b/tests/tbs/tb0668a.pp
@@ -0,0 +1,20 @@
+{ %NORUN }
+
+program tb0668a;
+
+{$mode objfpc}
+
+procedure FreeAndNil(var Obj);
+begin
+end;
+
+generic procedure FreeAndNil<T: class>(var Obj: T);
+begin
+end;
+
+var
+ t: TObject;
+begin
+ FreeAndNil(t);
+ specialize FreeAndNil<TObject>(t);
+end.
diff --git a/tests/tbs/tb0668b.pp b/tests/tbs/tb0668b.pp
new file mode 100644
index 0000000000..98136e3d70
--- /dev/null
+++ b/tests/tbs/tb0668b.pp
@@ -0,0 +1,20 @@
+{ %NORUN }
+
+program tb0668b;
+
+{$mode objfpc}
+
+generic procedure FreeAndNil<T: class>(var Obj: T);
+begin
+end;
+
+procedure FreeAndNil(var Obj);
+begin
+end;
+
+var
+ t: TObject;
+begin
+ FreeAndNil(t);
+ specialize FreeAndNil<TObject>(t);
+end.