mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
- Switch all the 'self' mutable arguments to take self as @inout, since binding methods to uncurried functions expose them as such. - Eliminate the subtype relationship between @inout and @inout(implicit), which means that we eliminate all sorts of weird cases where they get dropped (see the updated testcases). - Eliminate the logic in adjustLValueForReference that walks through functions converting @inout to @inout(implicit) in strange cases. - Introduce a new set of type checker constraints and conversion kinds to properly handle assignment operators: when rebound or curried, their input/result argument is exposed as @inout and requires an explicit &. When applied directly (e.g. as ++i), they get an implicit AddressOfExpr to bind the mutated lvalue as an @inout argument. Overall, the short term effect of this is to fix a few old bugs handling lvalues. The long term effect is to drive a larger wedge between implicit and explicit lvalues. Swift SVN r11708
71 KiB
71 KiB