Skip to content

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

@iby

Description

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

Attachment: Download

Additional Detail from JIRA
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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of Implementationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions