fix #2176
This commit is contained in:
parent
b65758270c
commit
840c6637d0
9
TestSuite/extensionoperators4.pas
Normal file
9
TestSuite/extensionoperators4.pas
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
function operator=<T>(a,b: array of T): boolean; extensionmethod :=
|
||||
(a.Length=b.Length) and a.SequenceEqual(b);
|
||||
|
||||
begin
|
||||
var a := Arr(1,2,3);
|
||||
var b := Arr(1,2,3);
|
||||
Assert(not object.ReferenceEquals(a,b));
|
||||
Assert(a = b);
|
||||
end.
|
||||
|
|
@ -3456,7 +3456,7 @@ namespace PascalABCCompiler.TreeRealization
|
|||
List<SymbolInfo> sil2 = find_in_additional_names(name);
|
||||
List<SymbolInfo> sil3 = compiled_find(name);
|
||||
bool clone = false;
|
||||
if (!no_search_in_extension_methods || this._compiled_type.IsGenericType)
|
||||
if (!no_search_in_extension_methods || this._compiled_type.IsGenericType || this.type_special_kind == SemanticTree.type_special_kind.array_kind)
|
||||
{
|
||||
|
||||
if (this.type_special_kind == SemanticTree.type_special_kind.array_kind && this.base_type.Scope != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue