fix #1507
This commit is contained in:
parent
3670ff6aff
commit
42ab125c55
7
TestSuite/extensionmethods32.pas
Normal file
7
TestSuite/extensionmethods32.pas
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
function f1: byte := 0;
|
||||
|
||||
begin
|
||||
var l := new List<byte>;
|
||||
l += f1;
|
||||
assert(l[0] = 0);
|
||||
end.
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue