-
Notifications
You must be signed in to change notification settings - Fork 62
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
Fix to make incorrect return type into error #169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your first contribution!
Left one minor request then after that we can merge this.
@MikuroXina I merged your PR as is, thanks for the contribution! I added a commit message to illustrate the change. We try to explain every commit using a thorough example. I've also updated your PR body with an example. |
Sorry for pointing you in the wrong direction. I made a change to improve the compile time error message here 1b33e95 Here's the new message: swift-bridge/crates/swift-bridge-macro/tests/ui/incorrect-return-type.stderr Lines 1 to 33 in 1b33e95
|
Closed #12 |
This commit introduces a compile time error for incorrect return types.
For example, the following will now fail to compile:
Before this commit the above example would compile and calling
get_reference
would cause undefined behavior.