Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-4802] Data slicing regression #3865

Open
Bouke opened this issue May 4, 2017 · 4 comments
Open

[SR-4802] Data slicing regression #3865

Bouke opened this issue May 4, 2017 · 4 comments

Comments

@Bouke
Copy link
Contributor

Bouke commented May 4, 2017

Previous ID SR-4802
Radar rdar://problem/32134716
Original Reporter @Bouke
Type Bug
Environment

Swift 3.1.1 Ubuntu 16.04

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug, 3.1Regression
Assignee None
Priority Medium

md5: 8658f007c32a034ffc11f2738558eafd

Issue Description:

let data = Data(bytes: [1, 2, 3, 4])
let slice = data[2..<4]
dump(slice)
dump(Data(slice))
dump(Array(slice))

The expected output would be the bytes [3, 4], however it returns respectively:

[1, 2]
[3, 4]
[random, random]
@belkadan
Copy link

belkadan commented May 5, 2017

@phausler, I thought this got fixed? Did the fix not make it into corelibs' 3.1 branch?

@Bouke
Copy link
Contributor Author

Bouke commented May 5, 2017

The same issue is still there with the latest trunk snapshot (DEVELOPMENT-SNAPSHOT-2017-04-24-a).

@belkadan
Copy link

belkadan commented May 8, 2017

@swift-ci create

@Bouke
Copy link
Contributor Author

Bouke commented Aug 27, 2017

It appears to be resolved; I tested against 4.0-DEVELOPMENT-SNAPSHOT-2017-08-20-a.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants