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-10647] No error when conforming to RangeReplaceableCollection #53047

Closed
swift-ci opened this issue May 9, 2019 · 6 comments
Closed

[SR-10647] No error when conforming to RangeReplaceableCollection #53047

swift-ci opened this issue May 9, 2019 · 6 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented May 9, 2019

Previous ID SR-10647
Radar None
Original Reporter Jaap (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

macOS 10.14.4

Xcode 10.2.1

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 0413c3a305281391daba15a807bdb59f

duplicates:

  • SR-6501 RangeReplaceableCollection default implementations cause infinite recursion

Issue Description:

Compiler doesn't give errors when conforming to the RangeReplaceableCollection without implementing

replaceSubrange(:with:)

. Program compiles without errors. Running a program calling

replaceSubrange(:with:)

results in a bad access error

@belkadan
Copy link
Contributor

Can you attach an example project or playground so that we can see what you did implement?

@tkrajacic
Copy link

@belkadan I added a sample project since I found this bug to be the same I was just going to file. There is a recursive call to protocol witnesses. @gwynne knowns more 😉

This is tested in Xcode 11b4

@tkrajacic
Copy link

Which actually seems to be the same as SR-6501

@gwynne
Copy link
Contributor

gwynne commented Jul 26, 2019

Yep, this is a dupe of 6501, though the sample project is definitely nice to have 🙂

@gwynne
Copy link
Contributor

gwynne commented Jul 26, 2019

The information available in this report should be copied over to SR-6501; the failure of the compiler to complain as shown here leads directly to the recursion demonstrated there.

@tkrajacic
Copy link

SR-5211 is also the same

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

4 participants