mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
If a non-static 'let' field in a struct has an initializer, its implicitly generated memberwise initializer should not override that. Handle this by having the memberwise initializer and default initializer use the initial value of the property instead of an argument to the init. This would have been a lot easier if sema was synthesizing the ctor bodies instead of SILGen, but here it is. The missing case is narrow (let (x,y) = (1,2)) and for now we just disable implicit synthesization of the incorrect case. Swift SVN r25424
6.5 KiB
6.5 KiB