codetools: set type + set type = set type, bug

git-svn-id: trunk@20915 -
This commit is contained in:
mattias 2009-07-21 13:53:06 +00:00
parent c192951c26
commit c24ad7a1d4

View File

@ -7017,8 +7017,7 @@ begin
then begin
// number operator (or string concatenating or set cut)
// + - *
if (Src[BinaryOperator.StartPos]='+')
and (LeftOperand.Desc in xtAllStringCompatibleTypes)
then begin
@ -7032,6 +7031,12 @@ begin
RaiseExceptionFmt(ctsIncompatibleTypesGotExpected,
['char',ExpressionTypeDescNames[RightOperand.Desc]]);
end;
end else if (Src[BinaryOperator.StartPos]='+')
and (LeftOperand.Desc=xtContext)
and (LeftOperand.Context.Node<>nil)
and (LeftOperand.Context.Node.Desc=ctnSetType)
then begin
Result:=LeftOperand;
end else begin
if (LeftOperand.Desc in xtAllRealTypes)
or (RightOperand.Desc in xtAllRealTypes) then
@ -8715,6 +8720,7 @@ begin
fdfTopLvlResolving,fdfFunctionResult];
ExprType:=FindExpressionResultType(Params,TermPos.StartPos,TermPos.EndPos);
end;
Result:=FindExprTypeAsString(ExprType,TermPos.StartPos,Params);
end;