From e2dcc3e428daa36991b075d238d1f8f88b1313ef Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 19 Jul 2005 07:25:37 +0000 Subject: [PATCH] Merged revisions 584-585 via svnmerge from /trunk git-svn-id: branches/fixes_2_0@672 - --- .gitattributes | 1 + compiler/scanner.pas | 6 ++---- tests/webtbs/tw4151.pp | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100755 tests/webtbs/tw4151.pp diff --git a/.gitattributes b/.gitattributes index 90dc7e277c..91b201e4df 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5963,6 +5963,7 @@ tests/webtbs/tw4115.pp svneol=native#text/plain tests/webtbs/tw4119.pp svneol=native#text/plain tests/webtbs/tw4140.pp svneol=native#text/plain tests/webtbs/tw4150.pp svneol=native#text/plain +tests/webtbs/tw4151.pp svneol=native#text/plain tests/webtbs/tw4155.pp svneol=native#text/plain tests/webtbs/tw4188.pp svneol=native#text/plain tests/webtbs/ub1873.pp svneol=native#text/plain diff --git a/compiler/scanner.pas b/compiler/scanner.pas index 230910a1a6..fa7b7b5ca9 100644 --- a/compiler/scanner.pas +++ b/compiler/scanner.pas @@ -673,12 +673,10 @@ implementation read_factor := upper(pchar(value.valueptr)); constset : begin - hs:=''; + hs:=','; for l:=0 to 255 do if l in pconstset(tconstsym(srsym).value.valueptr)^ then - hs:=hs+','+tostr(l); - if hs<>'' then - hs:=hs+','; + hs:=hs+tostr(l)+','; read_factor := hs; end; end; diff --git a/tests/webtbs/tw4151.pp b/tests/webtbs/tw4151.pp new file mode 100755 index 0000000000..dc36902519 --- /dev/null +++ b/tests/webtbs/tw4151.pp @@ -0,0 +1,16 @@ +{ Source provided for Free Pascal Bug Report 4151 } +{ Submitted by "Christian Iversen" on 2005-07-03 } +{ e-mail: chrivers@iversen-net.dk } + +{$mode delphi} + +program foo; +type + t = (a, b, c); +const bar = []; + +{$IF a in bar}{$MESSAGE ERROR '1'}{$IFEND} +{$IF a in []}{$MESSAGE ERROR '2'}{$IFEND} + +begin +end.