Skip to content

Utilities.swift Binary Operator Error #51

Open

Description

@rouviere

When attempting to run Sample Project Chapter 1.1 and 1.2 I get the following error on the Utilities.swift file:

Binary operator '===' cannot be applied to operands of type 'Self.Element' and 'AnyObject'

There is also a warning on ColorSpaceConversion.swift:

Initializer for struct 'ARGBPixel_s' must use "self.init(...)" or "self = ..." because the struct was imported from C

Activity

  1. tkrajacic commented on Jun 22, 2018

    @tkrajacic

    Have a look at my comment on #48

    Hope this helps

  2. EfrenPerez94 commented on Jul 6, 2018

    @EfrenPerez94

    As @tkrajacic says you need to change the extension to:

    extension Sequence where Element: AnyObject

    The type system only checks the Sequence's Element type so it can't establish that every element of the Sequence is also an AnyObject, so changing the extension the type system is not gonna have this problem.

    Please check that and if the problem is solved check this issue as complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions