Skip to content

Commit

Permalink
resolve the Swift conforms to nullability conformance issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hyp committed Feb 12, 2024
1 parent c6123c0 commit 1f5c266
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Sources/FirebaseCore/FutureProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public protocol FutureProtocol {
func Foo()

//func CallOnCompletion(_ completion: @escaping (UnsafeMutableRawPointer) -> Void, _ userData: UnsafeMutableRawPointer)
func CallOnCompletion(_ c: UnsafeMutableRawPointer)
func CallOnCompletion(_ c: swift_firebase.swift_cxx_shims.firebase.CompletionType, _ userData: UnsafeMutableRawPointer?)
}

@_spi(Internal)
Expand All @@ -28,12 +28,12 @@ public extension FutureProtocol {
func setCompletion(_ completion: @escaping () -> Void) {
Foo()

/*

withUnsafePointer(to: completion) { completion in
CallOnCompletion({ pvCompletion in
// XXX
}, UnsafeMutableRawPointer(mutating: completion))
}
*/

}
}
2 changes: 1 addition & 1 deletion Sources/firebase/include/FirebaseCore.hh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ template <class R> class ConformingFuture: public ::firebase::Future<R> {

void Foo() const {}

void CallOnCompletion(void* completion) const {
void CallOnCompletion(_Nonnull CompletionType, _Nullable void *userData) const {
//
}
} __attribute__((swift_attr("conforms_to:FirebaseCore.FutureProtocol")));
Expand Down

0 comments on commit 1f5c266

Please sign in to comment.