swiftlang/swift

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

Open

#47 041 ouverte le 1 avr. 2017

Voir sur GitHub
 (4 commentaires) (0 réactions) (0 assignés)Swift (10 719 forks)batch import
bugcompilerdiagnostics qualitygood first issue

Métriques du dépôt

Stars
 (69 989 stars)
Métriques de merge PR
 (Merge moyen 8j 17h) (510 PRs mergées en 30 j)

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?

Guide contributeur