Commit Graph

2 Commits

Author SHA1 Message Date
Joe Pamer
23458ce268 Fix constraint application on single expression closure bodies
So, it turns out that if the type checker were to re-write the Expr node of a single-expression closure body, we were never writing the modified body Expr back into the closure Expr.
This meant that if the closure expression's body were something like 'self.foo', we'd leave an UnresolvedDotExpr in the AST and most likely end up crashing down the line.

This has been responsible for about 4700 crash reports over the past several months. (Though, oddly enough, we didn't seem to hit it in the crash suite.) Thanks to Argyrios for pushing on this one!

rdar://problem/19840785

Swift SVN r25774
2015-03-05 01:57:25 +00:00
Joe Pamer
d6b362ee81 Don't re-typecheck closures that have been transformed to match a void-returning contextual type. Due to their transformation, these single-expression closures will now appear as multi-expression, so a re-typecheck could potentially result in bogus type errors. (Fixes rdar://problem/19806558, which is a regression from Xcode 6.4 seed 1.)
Swift SVN r25278
2015-02-13 19:23:30 +00:00