Commits

Doug Gregor committed 029f7329c50
Re-introduce the notion of implicit lvalues, to be used within the constraint-based type checker. We now model the address-of operator with the constraint [byref] T1 < T2 where T1 is a fresh variable and T2 is the type of the subexpression of &. Note that there's a little hack in the constraint generator that strips off the 'heap' qualifier when performing constraint-based type checking, because we're not actually using it for overloading (merely as an aid for IRgen) and it causes some trouble in the modeling of the address-of operator. We can now properly reject code such as swap(a, b) which should be swap(&a, &b) Swift SVN r2797