Skip to content

Commit b6c1ac0

Browse files
authored
Merge pull request #22267 from xedin/rdar-47492691
[ConstraintSystem] Decouple `designated types` feature from Swift ver…
2 parents 6449e47 + 0b29d9d commit b6c1ac0

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,10 +1897,10 @@ Constraint *ConstraintSystem::selectDisjunction() {
18971897
// disjunctions that we may not be able to short-circuit, allowing
18981898
// us to eliminate behavior that is exponential in the number of
18991899
// operators in the expression.
1900-
if (getASTContext().isSwiftVersionAtLeast(5) ||
1901-
TC.getLangOpts().SolverEnableOperatorDesignatedTypes)
1900+
if (TC.getLangOpts().SolverEnableOperatorDesignatedTypes) {
19021901
if (auto *disjunction = selectApplyDisjunction())
19031902
return disjunction;
1903+
}
19041904

19051905
if (auto *disjunction = selectBestBindingDisjunction(*this, disjunctions))
19061906
return disjunction;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// RUN: %target-typecheck-verify-swift
2+
// REQUIRES: objc_interop
3+
4+
import CoreGraphics
5+
import simd
6+
7+
func test(foo: CGFloat, bar: CGFloat) {
8+
_ = CGRect(x: 0.0 + 1.0, y: 0.0 + foo, width: 3.0 - 1 - 1 - 1.0, height: bar)
9+
}

0 commit comments

Comments
 (0)