-
Notifications
You must be signed in to change notification settings - Fork 730
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nil coalescing operator ambiguity #2619
Comments
I am also experiencing this |
I don't know if there is any good way around this. I think it's caused by the fact that It's resolved by specifying the type of |
Same issue here, and the codebase I'm working on has a lot of places where nil coalescing is used, so I just had to comment out the operator overload in |
Instead of commenting it out, try adding |
Ah thanks. That also works, and it feels like a better temporary solution. I was going to say they should add this to the SDK, but it seems that it's not recommended outside the compiler and standard library 😕 https://github.com/apple/swift/blob/main/docs/ReferenceGuides/UnderscoredAttributes.md |
I'm glad to hear it improves the issue, I'm going to go ahead with making that the fix and get it into |
Nil coalescing operator overload for
GraphQLNullable
results in ambiguity errors where type is not explicitly specified.Example:
let width = rect?.width ?? 0
Error:
The text was updated successfully, but these errors were encountered: