mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add a third branch to the constraint system for '&x' expressions that allows conversion from an lvalue to a type via an additional writeback step: - Add an LValueConversionExpr node that converts from @lvalue T to @lvalue U, given a pair of functions that convert T -> U and U -> T, to represent the writeback temporary. - Allow conversion in an inout expression from @lvalue T to a type U that has the following members: static func __writeback_conversion(Builtin.RawPointer, T.Type) -> U static func __writeback_conversion_get(T) -> V static func __writeback_conversion_set(V) -> T which builds a solution that produces an LValueConversion from the get/set pair before passing the pointer to the writeback temporary off to the conversion function. Swift SVN r15764
100 KiB
100 KiB