Open
Description
Previous ID | SR-9771 |
Radar | rdar://33820622 |
Original Reporter | SafelySwift (JIRA User) |
Type | Bug |
Attachment: Download
Environment
Additional Detail from JIRA
Votes | 0 |
Component/s | Xcode Playground Support |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: 795ff7ff2b7dd30d73ddefbcd99f8fd5
Issue Description:
As per this Swift Forums topic, the following code should trap due to overlapping read/write access.
var stepSize = 1
func increment(_ number: inout Int) {
number += stepSize
}
increment(&stepSize)
As specified on the docs,
> The read and write accesses refer to the same memory and they overlap, producing a conflict.
However, I put the code in a playground like such:
And nothing happens