mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 11:08:02 +02:00

* check "A op B" and "B op A" again for operators that can be commutative (all binary ones except shl, shr, div, mod, **, / and -) * also check for Nil for classrefdefs if left side is a pointer (allows "TClass var" <>/= Nil again, after the above changes) * don't allow overloads for "implicit pointer type <>/= pointer" and the other way around (this fixes non compiling Objective Pascal test tobjc21.pp and also the new toperator87.pp test) * some formating corrections + added test for "TObject <> Pointer" + added test for "TClass <>/= Nil" git-svn-id: trunk@21983 -
14 lines
153 B
ObjectPascal
14 lines
153 B
ObjectPascal
{ %NORUN }
|
|
program toperator88;
|
|
|
|
var
|
|
c: TClass;
|
|
b: Boolean;
|
|
begin
|
|
c := Nil;
|
|
b := c = Nil;
|
|
b := c <> Nil;
|
|
b := Nil = c;
|
|
b := Nil <> c;
|
|
end.
|