mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 00:59:27 +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 -
17 lines
161 B
ObjectPascal
17 lines
161 B
ObjectPascal
{ %NORUN }
|
|
|
|
program toperator87;
|
|
|
|
{$mode delphi}
|
|
|
|
var
|
|
p: Pointer;
|
|
o: TObject;
|
|
b: Boolean;
|
|
begin
|
|
p := Nil;
|
|
o := Nil;
|
|
b := p <> o;
|
|
b := o <> p;
|
|
end.
|