(cherry picked from commit 2396b36c21c58a00b1a2e49b288393470de5cf88)
@@ -459,7 +459,8 @@ implementation
) or
(
(lt=niln) and
- (rd.typ in [procvardef,procdef,classrefdef]) and
+ ((rd.typ in [procvardef,procdef,classrefdef]) or
+ (is_dynamic_array(rd))) and
(treetyp in identity_operators)
@@ -0,0 +1,13 @@
+{ %norun }
+program Project1;
+
+{$mode delphi}
+var a: TArray<integer>;
+begin
+ writeln ( a = nil );
+ writeln ( a <> nil );
+ writeln ( nil = a ); // project1.lpr(10,17) Error: Operator is not overloaded: "Pointer" = "TArray$1$crc9F312717"
+ writeln ( nil <> a ); // project1.lpr(11,17) Error: Operator is not overloaded: "Pointer" = "TArray$1$crc9F312717"
+end.