mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 04:28:00 +02:00
30 lines
552 B
ObjectPascal
30 lines
552 B
ObjectPascal
{ %fail }
|
|
|
|
{ Source provided for Free Pascal Bug Report 3343 }
|
|
{ Submitted by "Martin Schreiber" on 2004-10-06 }
|
|
{ e-mail: }
|
|
program project1;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
uses
|
|
Classes;
|
|
|
|
type
|
|
|
|
itest = interface
|
|
end;
|
|
|
|
ttestclass = class(tinterfacedobject)
|
|
end;
|
|
|
|
var
|
|
testclass: ttestclass;
|
|
testintf: itest;
|
|
begin
|
|
testclass:= ttestclass.create;
|
|
testintf:= itest(testclass);
|
|
//fpc: project1.pas(21,13) Warning: Class types "ttestclass" and "itest" are not related
|
|
//kylix: [Error] project1.pas(21): Incompatible types: 'itest' and 'ttestclass'
|
|
end.
|