Skip to content

Commit 4ab6e76

Browse files
Merge pull request #13171 from aschwaighofer/revert_csgen
Revert "[CSGen] Fix `LinkedExprAnalyzer` greedy operator linking"
2 parents 0c1d8a1 + c544a27 commit 4ab6e76

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

lib/Sema/CSGen.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,6 @@ namespace {
408408
// argument types, we can directly simplify the associated constraint
409409
// graph.
410410
auto simplifyBinOpExprTyVars = [&]() {
411-
// Don't attempt to do linking if there are
412-
// literals intermingled with other inferred types.
413-
if (lti.haveLiteral())
414-
return;
415-
416411
for (auto binExp1 : lti.binaryExprs) {
417412
for (auto binExp2 : lti.binaryExprs) {
418413
if (binExp1 == binExp2)

test/Constraints/operator.swift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -176,21 +176,3 @@ func + (lhs: B_28688585, rhs: B_28688585) -> B_28688585 {
176176

177177
let var_28688585 = D_28688585(value: 1)
178178
_ = var_28688585 + var_28688585 + var_28688585 // Ok
179-
180-
// rdar://problem/35740653 - Fix `LinkedExprAnalyzer` greedy operator linking
181-
182-
struct S_35740653 {
183-
var v: Double = 42
184-
185-
static func value(_ value: Double) -> S_35740653 {
186-
return S_35740653(v: value)
187-
}
188-
189-
static func / (lhs: S_35740653, rhs: S_35740653) -> Double {
190-
return lhs.v / rhs.v
191-
}
192-
}
193-
194-
func rdar35740653(val: S_35740653) {
195-
let _ = 0...Int(val / .value(1.0 / 42.0)) // Ok
196-
}

0 commit comments

Comments
 (0)