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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler failure in Xcode 11 #22

Merged

Commits on Oct 10, 2019

  1. Fix compiler failure in Xcode 11

    For some unknown reason (at least to me) the `subscript(position:)`
    extension on `MutableCollection` where `Index == Int` was causing the
    compilation to fail with a weird `DESERIALIZATION FAILURE` error,
    as mentioned on pointfreeco#15.
    
    Updating the `subscript` to use `C.Index` instead of `Int` appears to
    make the compiler happy and successfully compile the project. My
    suspicion is that it somehow enables it to disambiguate between the
    multiple `subscript` implementations, but it's pure speculation 馃敭.
    
    On our tests this seems to have fixed the issue, and since it's an
    equivalent definition of the subscript (even though more "precise"
    from a generics POV), it should cause no side effects.
    
    Fixes pointfreeco#15. 馃帀
    p4checo committed Oct 10, 2019
    Configuration menu
    Copy the full SHA
    9670a49 View commit details
    Browse the repository at this point in the history
  2. Make NonEmpty conform to Collection in type declaration

    Apparently by defining `NonEmpty` as conforming to `Collection` right
    away in its declaration (instead of in an extension), the compilation
    failure seems to be fixed.
    
    Even when performing a clean build, the target now successfully
    compiles. 馃帀
    
    Not sure about the actual cause for this, but this definitely seems
    like a compiler bug (file ordering / dependency, perhaps?).
    p4checo committed Oct 10, 2019
    Configuration menu
    Copy the full SHA
    4d419d6 View commit details
    Browse the repository at this point in the history