mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 03:19:27 +02:00
* fix precedence of IS operator, resolves #35909
git-svn-id: trunk@44266 -
This commit is contained in:
parent
fc49266749
commit
bc3131688a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -16221,6 +16221,7 @@ tests/webtbf/tw35671.pp svneol=native#text/plain
|
||||
tests/webtbf/tw35753.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3583.pp svneol=native#text/plain
|
||||
tests/webtbf/tw35866.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw35909.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw35981.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw36114.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw36223.pp svneol=native#text/pascal
|
||||
|
@ -344,10 +344,10 @@ const
|
||||
|
||||
{ Warning these stay be ordered !! }
|
||||
operator_levels:array[Toperator_precedence] of set of NOTOKEN..last_operator=
|
||||
([_LT,_LTE,_GT,_GTE,_EQ,_NE,_OP_IN],
|
||||
([_LT,_LTE,_GT,_GTE,_EQ,_NE,_OP_IN,_OP_IS],
|
||||
[_PLUS,_MINUS,_OP_OR,_PIPE,_OP_XOR],
|
||||
[_CARET,_SYMDIF,_STARSTAR,_STAR,_SLASH,
|
||||
_OP_AS,_OP_IS,_OP_AND,_AMPERSAND,_OP_DIV,_OP_MOD,_OP_SHL,_OP_SHR],
|
||||
_OP_AS,_OP_AND,_AMPERSAND,_OP_DIV,_OP_MOD,_OP_SHL,_OP_SHR],
|
||||
[_STARSTAR] );
|
||||
|
||||
type
|
||||
|
@ -12283,7 +12283,7 @@ begin
|
||||
if CurrentLoop.FGroupHeaderList.Count > 0 then
|
||||
begin
|
||||
{ when data band overflows use start with lowest gropup header }
|
||||
if aBand is TFPReportCustomDataBand and
|
||||
if (aBand is TFPReportCustomDataBand) and
|
||||
not Assigned(TFPReportCustomDataBand(aband).MasterBand) then
|
||||
lToMoveGrp := TFPReportCustomGroupHeaderBand(CurrentLoop.FGroupHeaderList[0])
|
||||
{ when group header overflows use start with parent group header }
|
||||
|
12
tests/webtbf/tw35909.pp
Normal file
12
tests/webtbf/tw35909.pp
Normal file
@ -0,0 +1,12 @@
|
||||
{ %fail% }
|
||||
{$mode delphi}
|
||||
program IS_Precedence;
|
||||
uses
|
||||
Classes;
|
||||
var
|
||||
O1, O2: TObject;
|
||||
begin
|
||||
O1 := TComponent.Create(nil);
|
||||
O2 := TObject.Create;
|
||||
Writeln(O1 is TComponent or O2 is TComponent); // <<< should not compile because OR has precedence before IS
|
||||
end.
|
Loading…
Reference in New Issue
Block a user