phimage / Prephirences

Prephirences is a Swift library that provides useful protocols and convenience methods to manage application preferences, configurations and app-state. UserDefaults
MIT License
573 stars 35 forks source link

Compilation error by Xcode7.0 beta6. #4

Closed chenjsa closed 9 years ago

chenjsa commented 9 years ago

Hi, I integrated prephirences into my project by cocopoads, the code is pod 'Prephirences', :git => 'https://github.com/phimage/Prephirences.git', :branch => '2.0.0'. Now in Xcode7.0 beta6 i get a compilation error. Type 'Bool' does not comform to protocol 'LogicalOperationsType', in Preference.swift line 256. I don't know how to fix it, could you please help me? Thank you!

phimage commented 9 years ago

Ok I have not already updated my xcode 7, I will fix after updated (PR is welcome)

LogicalOperationsType in my code

    func && (left: Self, @autoclosure right:  () -> Self) -> Self // AND
    func || (left: Self, @autoclosure right:  () -> Self) -> Self // OR
    prefix func ! (left: Self) -> Self // NOT

Bool must not in beta6 implement this operators, maybe change into methods signature

phimage commented 9 years ago

Now Bool implement operator with closure that can throw exception

func && (left: Self, @autoclosure right:  () throws -> Self) rethrows -> Self // AND
func || (left: Self, @autoclosure right:  () throws -> Self) rethrows -> Self // OR

I fixed some others errors