Skip to content
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

feat: Create +ResultTypes for Swift again as we now use C++ types #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrousavy
Copy link
Owner

Wraps all results of Swift functions in a Name_method_Result type that looks like this:

@frozen
public enum HybridSwiftKotlinTestObjectSpecCxx_callCallback_Result {
  case successful(Double)
  case failure(error: String)
}

This way we catch errors and propagate them to C++ safely, as a throw in Swift cannot be caught in C++ but instead would crash the entire app.

The problem is now that this won't build tho...

@mrousavy mrousavy added the nitrogen Issue is related to the code-generator "Nitrogen" label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nitrogen Issue is related to the code-generator "Nitrogen"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant