Skip to content

Commit ced47f1

Browse files
committed
Fix IE 2005010502 for char+empty string in statement expressions
1 parent ec8c015 commit ced47f1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

compiler/pstatmnt.pas

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ implementation
7171
String constants are typed as chararray (array of char with
7272
ado_IsConstString), so chararray must be promoted like strings. }
7373
if not assigned(olddef) or
74-
(is_anychar(olddef) and (is_string(branchdef) or is_chararray(branchdef))) then
74+
(is_anychar(olddef) and is_string(branchdef)) then
7575
result:=branchdef
76+
else if (is_anychar(olddef) and is_chararray(branchdef)) or
77+
(is_chararray(olddef) and is_anychar(branchdef)) then
78+
result:=cansistringtype
7679
else if is_widestring(branchdef) or
7780
((is_ansistring(olddef) or is_shortstring(olddef) or is_chararray(olddef)) and is_widechar(branchdef)) then
7881
result:=cwidestringtype

0 commit comments

Comments
 (0)