Skip to content

Commit 5c3b0e5

Browse files
committed
---
yaml --- r: 343767 b: refs/heads/master-rebranch c: 187647d h: refs/heads/master i: 343765: ce62e8e 343763: 32803a1 343759: c242f41
1 parent 69de3fd commit 5c3b0e5

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14551455
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14561456
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14571457
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1458-
refs/heads/master-rebranch: b92a4eb9c19c405efda12f6ae97c933f3649a2ef
1458+
refs/heads/master-rebranch: 187647de62fc6132c4e4c6f891edeba3133834e2
14591459
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14601460
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14611461
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec

branches/master-rebranch/lib/Sema/CSApply.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7577,7 +7577,8 @@ bool ConstraintSystem::applySolutionFixes(Expr *E, const Solution &solution) {
75777577
auto *transformedExpr = result->second.second;
75787578
// Since this closure has been transformed into something
75797579
// else let's look inside transformed expression instead.
7580-
return {true, transformedExpr};
7580+
transformedExpr->walk(*this);
7581+
return {false, E};
75817582
}
75827583
}
75837584

branches/master-rebranch/test/Constraints/function_builder_diags.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,18 @@ struct SR11440 {
199199
})
200200
}
201201
}
202+
203+
func acceptInt(_: Int, _: () -> Void) { }
204+
205+
// SR-11350 crash due to improper recontextualization.
206+
func erroneousSR11350(x: Int) {
207+
tuplify(true) { b in
208+
17
209+
x + 25
210+
Optional(tuplify(false) { b in
211+
if b {
212+
acceptInt(0) { }
213+
}
214+
}).domap(0) // expected-error{{value of type 'Optional<()>' has no member 'domap'}}
215+
}
216+
}

0 commit comments

Comments
 (0)