diff --git a/packages/fcl-passrc/src/pparser.pp b/packages/fcl-passrc/src/pparser.pp index b2526a5446..f383abc0f6 100644 --- a/packages/fcl-passrc/src/pparser.pp +++ b/packages/fcl-passrc/src/pparser.pp @@ -1057,7 +1057,7 @@ begin else ParseExcSyntaxError; end - else if CurToken=tkDotDot then // Type A = A..B; + else if (CurToken in [tkBraceOpen,tkDotDot]) then // Type A = B..C; K:=stkRange else ParseExcTokenError(';'); diff --git a/packages/fcl-passrc/tests/tctypeparser.pas b/packages/fcl-passrc/tests/tctypeparser.pas index e3338531b0..388bc64657 100644 --- a/packages/fcl-passrc/tests/tctypeparser.pas +++ b/packages/fcl-passrc/tests/tctypeparser.pas @@ -3099,6 +3099,8 @@ end; procedure TTestTypeParser.TestRangeLowHigh; begin + TShortCut = Low(Word)..High(Word); + DoParseRangeSet('low(TRange)..high(TRange)',''); end;