Skip to content

Commit

Permalink
[android] workaround for a serialization crash
Browse files Browse the repository at this point in the history
Crash is tracked by: swiftlang/swift#74578
  • Loading branch information
hyp committed Jun 20, 2024
1 parent 0fea568 commit 9454388
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Sources/firebase/include/FirebaseCore.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ class SWIFT_CONFORMS_TO_PROTOCOL(FirebaseCore.FutureProtocol)
completion(user_data);
});
}

// FIXME: Remove once https://github.com/apple/swift/issues/74578 is fixed.
int error() const {
return ::firebase::Future<R>::error();
}

// FIXME: Remove once https://github.com/apple/swift/issues/74578 is fixed.
const R *result() const {
return ::firebase::Future<R>::result();
}

// FIXME: Remove once https://github.com/apple/swift/issues/74578 is fixed.
const char *error_message() const {
return ::firebase::Future<R>::error_message();
}
};

// As a workaround, use `int` here instead of `void` for futures with no
Expand Down

0 comments on commit 9454388

Please sign in to comment.