@@ -416,7 +416,7 @@ namespace {
416
416
if (!group) return false ;
417
417
if (storedGroup == group) return !GroupAndIsStrict.getInt ();
418
418
return TC.Context .associateInfixOperators (group, storedGroup)
419
- == Associativity::Left ;
419
+ != Associativity::Right ;
420
420
}
421
421
};
422
422
} // end anonymous namespace
@@ -522,17 +522,8 @@ static Expr *foldSequence(TypeChecker &TC, DeclContext *DC,
522
522
// If we've drained the entire sequence, we're done.
523
523
if (S.empty ()) return LHS;
524
524
525
- // Otherwise, we have to check that this next operator actually
526
- // associates.
527
- if ((op2 = getNextOperator ()) && op2.precedence ) {
528
- associativity =
529
- TC.Context .associateInfixOperators (op1.precedence , op2.precedence );
530
- RHS = S[1 ];
531
- }
532
-
533
- // If so, start all over with our new LHS.
534
- if (associativity != Associativity::None)
535
- return foldSequence (TC, DC, LHS, S, precedenceBound);
525
+ // Otherwise, start all over with our new LHS.
526
+ return foldSequence (TC, DC, LHS, S, precedenceBound);
536
527
}
537
528
538
529
// If we ended up here, it's because we're either:
0 commit comments