Commit Graph

2410 Commits

Author SHA1 Message Date
Doug Gregor
14143ae43e Encapsulate the lvalue/rvalue adjustments needed for 'self' in a static function.
Swift SVN r11299
2013-12-14 04:52:42 +00:00
Doug Gregor
1d12c5352c Check a complete array-new expression within a single constraint system.
Fixes <rdar://problem/15653973>.


Swift SVN r11262
2013-12-13 19:16:19 +00:00
Doug Gregor
02565748b7 Fold checking of the subexpression of 'is' into the enclosing constraint system.
Similar to r11235, but for 'is' expressions. QoI suffers somewhat here
because (1) we don't have an easy way to specialize the diagnostic,
and (2) we can't fix up the broken constraint system when we hit a
problem.


Swift SVN r11241
2013-12-13 05:00:06 +00:00
Doug Gregor
74784f89c4 Fold checking of the subexpression in "x as T" into the enclosing constraint system.
Previously, we had an artificial separation between the subexpression
"x" and the context of the expression "x as T". This breaks down when
the subexpression includes a reference to an anonymous closure
argument (e.g., $0) from a single-expression closure. By merging the
systems, we fix the crasher (<rdar://problem/15633178>) and allow
improved type inference for these expressions.



Swift SVN r11235
2013-12-13 04:30:20 +00:00
Chris Lattner
64f77480c3 mark "self" immutable (except in methods on value types), and mark the "value" argument to setters as immutable.
Swift SVN r11185
2013-12-12 07:45:40 +00:00
Doug Gregor
69a3c4120f Deal with tuple-to-scalar conversions a bit better.
Notice that I'm hacking the test to get it running again. I'd normally
feel bad about this, but since labeled tuple elements are going away,
the class of problems this commit is working around will disappear
entirely.


Swift SVN r11115
2013-12-11 02:23:55 +00:00
Chris Lattner
39224db6a9 remove the ZeroValueExpr AST node.
Swift SVN r11048
2013-12-09 23:16:14 +00:00
Doug Gregor
79f8175e0b Solver: Keep track of a solution's score as we're computing it.
No functionality change here; just staging for some future optimizations.


Swift SVN r11028
2013-12-09 17:12:07 +00:00
Doug Gregor
5bb053c0dd Fix renamed file names
Swift SVN r11017
2013-12-09 14:20:33 +00:00
Doug Gregor
ee545e9f68 Rename TypeCheckConstraintsFoo.cpp to CSFoo.cpp.
It's more idiomatic and easier to type.


Swift SVN r11015
2013-12-09 14:09:54 +00:00