FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

both operands of "===" should be AnyObject by EdgarDegas · Pull Request #46 · objcio/core-data · GitHub

both operands of "===" should be AnyObject - #46

Open
EdgarDegas wants to merge 1 commit into
objcio:masterfrom
EdgarDegas:master
Open

both operands of "===" should be AnyObject#46
EdgarDegas wants to merge 1 commit into
objcio:masterfrom
EdgarDegas:master

Conversation

Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

This eliminates the compiler error. But does it eliminate the root cause? That is, should $0 be Any Object?

tkrajacic commented Apr 21, 2018
edited
Loading

Copy link
Copy Markdown

The correct A better fix for this would be to change the extension to:

extension Sequence where Element: AnyObject

While the iterator also uses the Element associated type and that one is constrained to be equal to the Sequence's Element type, the type system only checks the Sequence's Element type in this case, so it can't establish that every element of the Sequence is also an AnyObject anyway when only the Iterator's Element is specified.

Hope that makes sense.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL