mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-25 17:49:05 +02:00
codetools: set type + set type = set type, bug #14175
git-svn-id: trunk@20915 -
This commit is contained in:
parent
c192951c26
commit
c24ad7a1d4
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user