Browse Source

* More range type parsing errors

git-svn-id: trunk@34675 -
michael 8 years ago
parent
commit
65ea20e9e0
2 changed files with 3 additions and 1 deletions
  1. 1 1
      packages/fcl-passrc/src/pparser.pp
  2. 2 0
      packages/fcl-passrc/tests/tctypeparser.pas

+ 1 - 1
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(';');

+ 2 - 0
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;