swiftlang/swift

[SR-4464] Assigning a property to itself fails in 3.1

Open

#47,041 opened on Apr 1, 2017

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Swift (69,989 stars) (10,719 forks)batch import
bugcompilerdiagnostics qualitygood first issue

Description

Previous ID SR-4464
Radar None
Original Reporter @iby
Type Bug
Status In Progress
Resolution

Attachment: Download

Votes 0
Component/s Compiler
Labels Bug, 3.1Regression, DiagnosticsQoI, StarterBug
Assignee None
Priority Medium

md5: 702671bd69d19bebf1a102eb3ec92355

Issue Description:

Prior 3.1 we could assign property to itself if needed with self.name = (self.name), now it fails. Also, see this for details – http://stackoverflow.com/a/31931318/458356.

Just discovered by luck, apparently the supported syntax now is (self.name = self.name), is this official?

Contributor guide