Merge pull request #76 from lewinjh/master
Defining a "set of byte" no longer requires casting each element to byte
This commit is contained in:
commit
fce4394925
@ -6035,7 +6035,7 @@ function TPSPascalCompiler.ProcessSub(BlockInfo: TPSBlockInfo): Boolean;
|
|||||||
for i := 0 to arr.count -1 do
|
for i := 0 to arr.count -1 do
|
||||||
begin
|
begin
|
||||||
mType := GetTypeNo(BlockInfo, arr.Item[i]);
|
mType := GetTypeNo(BlockInfo, arr.Item[i]);
|
||||||
if mType <> SetType.SetType then
|
if (mType <> SetType.SetType) and not (IsIntType(mType.FBaseType) and IsIntType(SetType.SetType.BaseType)) then
|
||||||
begin
|
begin
|
||||||
with MakeError('', ecTypeMismatch, '') do
|
with MakeError('', ecTypeMismatch, '') do
|
||||||
begin
|
begin
|
||||||
@ -6055,6 +6055,18 @@ function TPSPascalCompiler.ProcessSub(BlockInfo: TPSBlockInfo): Boolean;
|
|||||||
dataval.Free;
|
dataval.Free;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
if (c < Low(Byte)) or (c > High(Byte)) then
|
||||||
|
begin
|
||||||
|
with MakeError('', ecTypeMismatch, '') do
|
||||||
|
begin
|
||||||
|
FCol := arr.item[i].Col;
|
||||||
|
FRow := arr.item[i].Row;
|
||||||
|
FPosition := arr.item[i].Pos;
|
||||||
|
end;
|
||||||
|
DataVal.Free;
|
||||||
|
Result := False;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
Set_MakeMember(c, dataval.Data.tstring);
|
Set_MakeMember(c, dataval.Data.tstring);
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user