Commits

Doug Gregor committed 5e2619802d5
Tighten up the semantics of unchecked downcasts (x as! T). Explicit detect (and reject) conversions that aren't class downcasts. We'll want to lift some of these restrictions later (see <rdar://problem/14013456>), but for now we just reject them with a decent diagnostic (rather than crashing). When an explicit downcast is actually just a coercion, complain, provide a Fix-It, and update the AST appropriately. This also splits the checking of unchecked downcasts into two different constraint systems: one for the context of expression, and one for the subexpression, then compares the results. This eliminates the need to model "can be downcast to" in the constraint solver, and makes it easier to provide good diagnostics. Swift SVN r5377