This commit is contained in:
Бондарев Иван 2018-12-16 21:09:54 +01:00
parent 3670ff6aff
commit 42ab125c55
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,7 @@
function f1: byte := 0;
begin
var l := new List<byte>;
l += f1;
assert(l[0] = 0);
end.

View file

@ -1136,6 +1136,11 @@ namespace PascalABCCompiler.TreeConverter
}
}
if (right_type.semantic_node_type == semantic_node_type.delegated_method && !left_type.IsDelegate && left_type.semantic_node_type != semantic_node_type.delegated_method)
{
try_convert_typed_expression_to_function_call(ref right);
right_type = right.type;
}
if (right_type.semantic_node_type == semantic_node_type.delegated_method && name != compiler_string_consts.plusassign_name && name != compiler_string_consts.minusassign_name)
{
delegated_methods dm2 = (delegated_methods)right_type;