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
|
||||
begin
|
||||
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
|
||||
with MakeError('', ecTypeMismatch, '') do
|
||||
begin
|
||||
@ -6055,6 +6055,18 @@ function TPSPascalCompiler.ProcessSub(BlockInfo: TPSBlockInfo): Boolean;
|
||||
dataval.Free;
|
||||
exit;
|
||||
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);
|
||||
end else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user