File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3
- refs/heads/master-next: f3f5194bcd8be7cce7657718be51a3d663e39108
3
+ refs/heads/master-next: ac53a288b214f791e9538f5994b7d25c28a2970c
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
6
6
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07
Original file line number Diff line number Diff line change @@ -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
Original file line number Diff line number Diff line change @@ -237,3 +237,21 @@ func sr10843() {
237
237
( ^^^ ) ( s, s)
238
238
_ = ( == ) ( 0 , 0 )
239
239
}
240
+
241
+ // SR-10970
242
+ precedencegroup PowerPrecedence {
243
+ lowerThan : BitwiseShiftPrecedence
244
+ higherThan : AdditionPrecedence
245
+ associativity : right
246
+ }
247
+ infix operator ^^ : PowerPrecedence
248
+
249
+ extension Int {
250
+ static func ^^ ( lhs: Int , rhs: Int ) -> Int {
251
+ var result = 1
252
+ for _ in 1 ... rhs { result *= lhs }
253
+ return result
254
+ }
255
+ }
256
+
257
+ _ = 1 ^^ 2 ^^ 3 * 4 // expected-error {{adjacent operators are in unordered precedence groups 'PowerPrecedence' and 'MultiplicationPrecedence'}}
You can’t perform that action at this time.
0 commit comments