This commit is contained in:
Бондарев Иван 2018-05-08 19:54:14 +02:00
parent aa1b0f043b
commit 061c066a71
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,7 @@
type
I1 = interface
end;
begin
(I1(System.Math.Sin));
end.

View file

@ -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))