From aca2bd83c7720259b8ef09abc83450f3afaf4e72 Mon Sep 17 00:00:00 2001 From: svenbarth Date: Sat, 3 Dec 2011 10:53:02 +0000 Subject: [PATCH] pexpr.pas, post_comp_expr_gendef: This is not the result you are looking for: The result of "postfixoperators" is only set to true if either "again" was "true" once or the node was changed to an errornode. So using the result for deciding whether we overwrite the def or not is incorrect. So just call "postfixoperators" and process the returned node accordingly. git-svn-id: branches/svenbarth/generics@19731 - --- compiler/pexpr.pas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas index a10c862dab..ae3d7b72e1 100644 --- a/compiler/pexpr.pas +++ b/compiler/pexpr.pas @@ -2975,11 +2975,11 @@ implementation { handle potential typecasts, etc } p1:=handle_factor_typenode(def,false,again,nil,false); { parse postfix operators } - if postfixoperators(p1,again,false) then - if assigned(p1) and (p1.nodetype=typen) then - def:=ttypenode(p1).typedef - else - def:=generrordef; + postfixoperators(p1,again,false); + if assigned(p1) and (p1.nodetype=typen) then + def:=ttypenode(p1).typedef + else + def:=generrordef; end; {****************************************************************************