* clean up of arrayconstructor_to_set, the stringdef case didn't work for years and is not tested, so it probably is not supposed to be there at all

This commit is contained in:
florian 2024-02-10 22:14:34 +01:00
parent cbbcc4356a
commit 8a48d1bbbc

View File

@ -665,23 +665,6 @@ implementation
end;
end;
end;
stringdef :
begin
if (p2.nodetype<>stringconstn) then
Message(parser_e_illegal_expression)
{ if we've already set elements which are constants }
{ throw an error }
else if ((hdef=nil) and assigned(result)) or
not(is_char(hdef)) then
CGMessage(type_e_typeconflict_in_set)
else
for l:=1 to length(pshortstring(tstringconstnode(p2).value_str)^) do
do_set(ord(pshortstring(tstringconstnode(p2).value_str)^[l]));
if hdef=nil then
hdef:=cansichartype;
p2.free;
end;
else
CGMessage(type_e_ordinal_expr_expected);
end;