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

Fix Type 'ChartDataSet' does not conform to protocol 'RangeReplaceabl… #4881

Closed
wants to merge 1 commit into from

Conversation

kanstantsin-bucha
Copy link

For some reason I got this error on xCode - beta.

Fix implemented by:

  • implementing method of RangeReplaceableCollection protocol for ChartDataSet
  • renaming of Range(objc ChartsRange) class cause it Shadows swift Range class that leads to compile errors.

@josipbernat
Copy link

Can somebody merge this PR? iOS 16 is near and this error breaks my app. Thanks!

@emadhegab
Copy link

@danielgindi I think this one is top priority if you don't mind

@richardsimkins
Copy link

This issue is also happening on 3.6.0 with Xcode 14 beta 6. Will merging this fix also fix it for people not on version 4.x.x?

@pmairoldi pmairoldi self-assigned this Aug 27, 2022
Copy link
Collaborator

@pmairoldi pmairoldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change works but I'd rather not change the Range class's name.

@@ -571,4 +571,12 @@ extension ChartDataSet: RangeReplaceableCollection {
entries.removeAll(keepingCapacity: keepCapacity)
notifyDataSetChanged()
}

public func replaceSubrange<C>(
_ subrange: Range<Index>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we just use Swift.Range<Index> here we don't have to rename the other Range class. I think it would be a better fix for the problem.

@pmairoldi
Copy link
Collaborator

Close in favour of #486. Thanks for the contribution.

@pmairoldi pmairoldi closed this Aug 28, 2022
@zygoat
Copy link

zygoat commented Aug 28, 2022

#486 is seven years old and unrelated. I presume that superseding issue number is a typo?

@pmairoldi
Copy link
Collaborator

Ahhhh sorry about that it was #4861

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants