diff --git a/compiler/nld.pas b/compiler/nld.pas index 1509cf7302..56d1183d82 100644 --- a/compiler/nld.pas +++ b/compiler/nld.pas @@ -521,9 +521,10 @@ implementation { opportunity quite difficult to detect (JM) } resulttypepass(tbinarynode(right).left); resulttypepass(tbinarynode(right).right); - if (is_char(tbinarynode(right).right.resulttype.def) or + if (tbinarynode(right).right.nodetype=stringconstn) or + is_char(tbinarynode(right).right.resulttype.def) or is_shortstring(tbinarynode(right).right.resulttype.def) or - is_ansistring(tbinarynode(right).right.resulttype.def)) then + is_ansistring(tbinarynode(right).right.resulttype.def) then begin { remove property flag so it'll not trigger an error } exclude(left.flags,nf_isproperty);