From 72c7d5b6c062973cd5bf6e0708c17f2650b71bc4 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Thu, 7 Dec 2006 15:19:30 +0000 Subject: [PATCH] * support ranges in case-options of variant records git-svn-id: trunk@5553 - --- .gitattributes | 1 + compiler/pdecvar.pas | 2 ++ tests/tbs/tb0516.pp | 14 ++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 tests/tbs/tb0516.pp diff --git a/.gitattributes b/.gitattributes index e9af1d055e..724bd7281d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6197,6 +6197,7 @@ tests/tbs/tb0512.pp svneol=native#text/plain tests/tbs/tb0513.pp svneol=native#text/plain tests/tbs/tb0514.pp svneol=native#text/plain tests/tbs/tb0515.pp svneol=native#text/plain +tests/tbs/tb0516.pp svneol=native#text/plain tests/tbs/ub0060.pp svneol=native#text/plain tests/tbs/ub0069.pp svneol=native#text/plain tests/tbs/ub0119.pp svneol=native#text/plain diff --git a/compiler/pdecvar.pas b/compiler/pdecvar.pas index e64af13ac3..b0ee06b8ec 100644 --- a/compiler/pdecvar.pas +++ b/compiler/pdecvar.pas @@ -1315,6 +1315,8 @@ implementation pt:=comp_expr(true); if not(pt.nodetype=ordconstn) then Message(parser_e_illegal_expression); + if try_to_consume(_POINTPOINT) then + pt:=crangenode.create(pt,comp_expr(true)); pt.free; if token=_COMMA then consume(_COMMA) diff --git a/tests/tbs/tb0516.pp b/tests/tbs/tb0516.pp new file mode 100644 index 0000000000..559580fb1b --- /dev/null +++ b/tests/tbs/tb0516.pp @@ -0,0 +1,14 @@ +{$mode delphi} + +type + ta = (ea,eb); + tb = (e1,e2); + tr = record + case a: byte of + -1,'c'..ea,e2..-5: (l: longint); + 'b'..eb,-1,-1,-1..-38,-100..e2: (c: cardinal); + end; + +begin +end. +