For one RealmSwift should likely consider changing their enum cases to use
lowerCamelCase like Swift 3 did. Also at some point it should consider the
changes to NSError / Swift.Error bridging.

-Shawn

On Wed, Sep 7, 2016 at 7:18 PM Zhao Xin via swift-users <
swift-users@swift.org> wrote:

> When I use RealmSwift in my project, I got an alert " 'Error' is ambiguous
> for type lookup in this context".
>
> import UIKit
>
> import UserNotifications
>
> import WatchConnectivity
>
> import RealmSwift
>
>
> extension AppDelegate:WCSessionDelegate {
>
>     func session(_ session: WCSession, activationDidCompleteWith
> activationState: WCSessionActivationState, error: Error?) {
>
>
>     }
>  }
>
>
> I think the reason is that in Swift, Error is a protocol. And in
> RealmSwift, there is a `case Error(NSError)` in `public enum
> RealmCollectionChange<T>`.
>
>
> I managed to eliminate the alert buy change `Error?` to `Swift.Error?`.
> Are there any other ways to fix this?
>
>
> Zhaoxin
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
>
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to