mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 17:06:14 +02:00
* 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:
parent
cbbcc4356a
commit
8a48d1bbbc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user