mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 03:39:30 +02:00
* fix type checking in constant sets
git-svn-id: trunk@583 -
This commit is contained in:
parent
438f229f52
commit
bead787962
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
23
tests/webtbf/tw4153.pp
Executable 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.
|
Loading…
Reference in New Issue
Block a user