diff --git a/.gitattributes b/.gitattributes index 215f444786..f185c665bc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13751,6 +13751,7 @@ tests/webtbf/tw23571b.pp svneol=native#text/pascal tests/webtbf/tw23571c.pp svneol=native#text/pascal tests/webtbf/tw2359.pp svneol=native#text/plain tests/webtbf/tw2362.pp svneol=native#text/plain +tests/webtbf/tw23702.pp svneol=native#text/pascal tests/webtbf/tw2383.pp svneol=native#text/plain tests/webtbf/tw2400.pp svneol=native#text/plain tests/webtbf/tw24013.pp svneol=native#text/plain diff --git a/tests/webtbf/tw23702.pp b/tests/webtbf/tw23702.pp new file mode 100644 index 0000000000..a7bc801d98 --- /dev/null +++ b/tests/webtbf/tw23702.pp @@ -0,0 +1,24 @@ +{ %FAIL } + +{$mode objfpc} +unit tw23702; +{ Unit to demonstrate that free pascal does not complain + when generic types promise to implement an interface but + then do not. } +interface + + type + IFoo = interface + function foo : byte; + end; + + generic GBar = class( TInterfacedObject, IFoo ) + // does not implement foo, but compiler doesn't care. + end; + + {TBar = class( TInterfacedObject, IFoo ) + // does not implement foo, and compiler complains + end;} + +implementation +end.