mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 19:11:03 +02:00
* fix boolean range parsing false..true
* allow set of boolean git-svn-id: trunk@1690 -
This commit is contained in:
parent
fbaa49fc9c
commit
e00ef44479
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -6349,8 +6349,10 @@ tests/webtbs/tw4398.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw4427.pp svneol=native#text/plain
|
tests/webtbs/tw4427.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4428.pp svneol=native#text/plain
|
tests/webtbs/tw4428.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4450.pp svneol=native#text/plain
|
tests/webtbs/tw4450.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw4477.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4487.pp -text svneol=unset#text/plain
|
tests/webtbs/tw4487.pp -text svneol=unset#text/plain
|
||||||
tests/webtbs/tw4489.pp -text svneol=unset#text/plain
|
tests/webtbs/tw4489.pp -text svneol=unset#text/plain
|
||||||
|
tests/webtbs/tw4496.pp svneol=native#text/plain
|
||||||
tests/webtbs/ub1873.pp svneol=native#text/plain
|
tests/webtbs/ub1873.pp svneol=native#text/plain
|
||||||
tests/webtbs/ub1883.pp svneol=native#text/plain
|
tests/webtbs/ub1883.pp svneol=native#text/plain
|
||||||
tests/webtbs/uw0555.pp svneol=native#text/plain
|
tests/webtbs/uw0555.pp svneol=native#text/plain
|
||||||
|
@ -308,7 +308,7 @@ implementation
|
|||||||
tt.setdef(torddef.create(uchar,lv,hv))
|
tt.setdef(torddef.create(uchar,lv,hv))
|
||||||
else
|
else
|
||||||
if is_boolean(pt1.resulttype.def) then
|
if is_boolean(pt1.resulttype.def) then
|
||||||
tt.setdef(torddef.create(bool8bit,l,hv))
|
tt.setdef(torddef.create(bool8bit,lv,hv))
|
||||||
else
|
else
|
||||||
tt.setdef(torddef.create(range_to_basetype(lv,hv),lv,hv));
|
tt.setdef(torddef.create(range_to_basetype(lv,hv),lv,hv));
|
||||||
end;
|
end;
|
||||||
@ -556,22 +556,12 @@ implementation
|
|||||||
Message(sym_e_ill_type_decl_set);
|
Message(sym_e_ill_type_decl_set);
|
||||||
orddef :
|
orddef :
|
||||||
begin
|
begin
|
||||||
case torddef(tt2.def).typ of
|
if (torddef(tt2.def).typ<>uvoid) and
|
||||||
uchar :
|
(torddef(tt2.def).low>=0) then
|
||||||
//!!! tt.setdef(tsetdef.create(tt2,0,255));
|
// !! tt.setdef(tsetdef.create(tt2,torddef(tt2.def).low,torddef(tt2.def).high))
|
||||||
tt.setdef(tsetdef.create(tt2,255));
|
tt.setdef(tsetdef.create(tt2,torddef(tt2.def).high))
|
||||||
u8bit,u16bit,u32bit,
|
else
|
||||||
s8bit,s16bit,s32bit :
|
Message(sym_e_ill_type_decl_set);
|
||||||
begin
|
|
||||||
if (torddef(tt2.def).low>=0) then
|
|
||||||
// !! tt.setdef(tsetdef.create(tt2,torddef(tt2.def).low,torddef(tt2.def).high))
|
|
||||||
tt.setdef(tsetdef.create(tt2,torddef(tt2.def).high))
|
|
||||||
else
|
|
||||||
Message(sym_e_ill_type_decl_set);
|
|
||||||
end;
|
|
||||||
else
|
|
||||||
Message(sym_e_ill_type_decl_set);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
Message(sym_e_ill_type_decl_set);
|
Message(sym_e_ill_type_decl_set);
|
||||||
|
5
tests/webtbs/tw4477.pp
Executable file
5
tests/webtbs/tw4477.pp
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 4477 }
|
||||||
|
{ Submitted by "Alexey Moiseitsev" on 2005-10-30 }
|
||||||
|
{ e-mail: himeraster@gmail.com }
|
||||||
|
var f : set of boolean;
|
||||||
|
begin end.
|
10
tests/webtbs/tw4496.pp
Executable file
10
tests/webtbs/tw4496.pp
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
type
|
||||||
|
//BoolDeriv = Boolean; //gives no internal error
|
||||||
|
BoolDeriv = false..true;
|
||||||
|
|
||||||
|
var
|
||||||
|
a: array[BoolDeriv] of char;
|
||||||
|
|
||||||
|
begin
|
||||||
|
a[true] := 'a'; //ierror 99080501 here
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user