bug fix #816
This commit is contained in:
parent
aa1b0f043b
commit
061c066a71
7
TestSuite/errors/err0239.pas
Normal file
7
TestSuite/errors/err0239.pas
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
type
|
||||
I1 = interface
|
||||
end;
|
||||
|
||||
begin
|
||||
(I1(System.Math.Sin));
|
||||
end.
|
||||
|
|
@ -681,7 +681,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
return ret;
|
||||
}
|
||||
|
||||
if ((type_table.is_derived(from.type, to)) || (type_table.is_derived(to, from.type)) || from.type.IsInterface || to.IsInterface)
|
||||
if ((type_table.is_derived(from.type, to)) || (type_table.is_derived(to, from.type)) || from.type.IsInterface || to.IsInterface && !(from.type is delegated_methods))
|
||||
{
|
||||
if (from.type.IsSealed && to.IsInterface && !from.type.ImplementingInterfaces.Contains(to) ||
|
||||
from.type.IsInterface && to.IsSealed && !to.ImplementingInterfaces.Contains(from.type))
|
||||
|
|
|
|||
Loading…
Reference in a new issue