This commit is contained in:
parent
2faf78f84a
commit
80f8e26011
|
|
@ -1,4 +1,4 @@
|
||||||
//!Нельзя преобразовать тип integer к Func<integer>
|
//!Нельзя преобразовать тип Func<integer> к integer
|
||||||
procedure p1<T>(a: array of ()->T; v: T) :=
|
procedure p1<T>(a: array of ()->T; v: T) :=
|
||||||
a[0] := ()->v;
|
a[0] := ()->v;
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//!Нельзя преобразовать тип integer к Func<integer>
|
//!Нельзя преобразовать тип Func<integer> к integer
|
||||||
procedure p1<T>(a: array of ()->T; v: T) :=
|
procedure p1<T>(a: array of ()->T; v: T) :=
|
||||||
a[0] := ()->v;
|
a[0] := ()->v;
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
convertion_data_and_alghoritms.check_convert_type_with_inheritance(elem_type, foreachVariable.type,
|
convertion_data_and_alghoritms.check_convert_type_with_inheritance(elem_type, foreachVariable.type,
|
||||||
get_location(_foreach_stmt.identifier));
|
get_location(_foreach_stmt.identifier));
|
||||||
if (elem_type.IsDelegate && !foreachVariable.type.IsDelegate)
|
if (elem_type.IsDelegate && !foreachVariable.type.IsDelegate)
|
||||||
AddError(new CanNotConvertTypes(null, foreachVariable.type, elem_type, get_location(_foreach_stmt.identifier)));
|
AddError(new CanNotConvertTypes(null, elem_type, foreachVariable.type, get_location(_foreach_stmt.identifier)));
|
||||||
return foreachVariable;
|
return foreachVariable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue