* fix type checking in constant sets

git-svn-id: trunk@583 -
This commit is contained in:
peter 2005-07-05 06:03:16 +00:00
parent 438f229f52
commit bead787962
3 changed files with 29 additions and 2 deletions

1
.gitattributes vendored
View File

@ -5487,6 +5487,7 @@ tests/webtbf/tw4103.pp svneol=native#text/plain
tests/webtbf/tw4111.pp svneol=native#text/plain
tests/webtbf/tw4139.pp svneol=native#text/plain
tests/webtbf/tw4144.pp svneol=native#text/plain
tests/webtbf/tw4153.pp svneol=native#text/plain
tests/webtbf/uw0744.pp svneol=native#text/plain
tests/webtbf/uw0840a.pp svneol=native#text/plain
tests/webtbf/uw0840b.pp svneol=native#text/plain

View File

@ -442,8 +442,11 @@ implementation
htype:=p2.resulttype;
end
else
update_constsethi(p2.resulttype)
end
update_constsethi(p2.resulttype);
end;
if assigned(htype.def) then
inserttypeconv(p2,htype)
else
inserttypeconv(p2,u8inttype);

23
tests/webtbf/tw4153.pp Executable file
View File

@ -0,0 +1,23 @@
{ %fail }
{ Source provided for Free Pascal Bug Report 4153 }
{ Submitted by "Ivo Steinmann" on 2005-07-03 }
{ e-mail: isteinmann@bluewin.ch }
type
Enum1 = (a, b, c);
Enum2 = (x, y, z);
const
// The next line should fail
Foobar = [b, z];
begin
if a in Foobar then
WriteLn('a in Foobar'); // not printed
if b in Foobar then
WriteLn('b in Foobar'); // printed
if c in Foobar then
WriteLn('c in Foobar'); // printed
end.