summaryrefslogtreecommitdiff
path: root/tests/tbs
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2018-12-28 18:25:58 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2018-12-28 18:25:58 +0000
commit0f8d0dfe9ce9d5bf1b90d953fade6ef30b34a609 (patch)
treef399f422b56b9b42e2dbd6110ce16b16a7e0185c /tests/tbs
parent1ceba004b48b473cd1963f1fed3de245c596b1fb (diff)
downloadfpc-0f8d0dfe9ce9d5bf1b90d953fade6ef30b34a609.tar.gz
* stop searching for methods to implement interfaces in parent classes after
encountering a method with the correct name that does not have the "overload" directive (same logic as when looking for a call candidate, to avoid errors when using a Pascal-level wrapper to call interface methods, and Delphi-compatible since it always required "overload" for overloaded methods) o also catches calling convention mismatches like in webtbs/tw27349 git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@40683 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/tbs')
-rw-r--r--tests/tbs/tb0654.pp34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/tbs/tb0654.pp b/tests/tbs/tb0654.pp
new file mode 100644
index 0000000000..a0025acc1d
--- /dev/null
+++ b/tests/tbs/tb0654.pp
@@ -0,0 +1,34 @@
+{ %norun }
+
+{$mode objfpc}{$h+}
+{$interfaces corba}
+
+type
+ tintf = interface
+ procedure test(l: longint);
+ procedure test(s: string);
+ end;
+
+ tp = class
+ procedure test(l: longint); overload; virtual;
+ procedure test(s: string); overload; virtual;
+ end;
+
+ tc = class(tp, tintf)
+ procedure test(l: longint); override;
+ end;
+
+procedure tp.test(l: longint);
+ begin
+ end;
+
+procedure tp.test(s: string);
+ begin
+ end;
+
+procedure tc.test(l: longint);
+ begin
+ end;
+
+begin
+end.