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

Fix generated code problems with nullable primitive return values #386

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

kring
Copy link
Member

@kring kring commented Dec 6, 2023

As a test, I added the following to Runtime/Helpers.cs:

public static bool? TestThing()
{
    return null;
}

And the following to Runtime/ConfigureReinterop.cs:

Helpers.TestThing();

Reinterop generated invalid code for this. After this PR, the code is generated correctly. We previously handled nullable blittable structs, but not nullable primitives.

@j9liu
Copy link
Contributor

j9liu commented Jan 10, 2024

This works well on my upgrade-feature-metadata branch so I'm going to merge. Thanks @kring !

@j9liu j9liu merged commit 9169cc0 into main Jan 10, 2024
6 checks passed
@j9liu j9liu deleted the nullable-primitives branch January 10, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants