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 for types derived from un-namespaced types. #261

Merged
merged 5 commits into from
Apr 8, 2024

Conversation

DmitriySft
Copy link
Contributor

@DmitriySft DmitriySft commented Apr 6, 2024

Type.Namespace can be null. There are cases where such cases are not correctly handled.

The easiest example is:

interface INoNamespaceInterface { }
namespace MyNamespace
{
    public class MyType: INoNamespaceInterface {} // Gives NRE
}

This PR fixes this problem.

But codebase-wise, there are places where Type.Namespace == null is not handled well. Suggest to fix all of them together with this feature request #262

@DmitriySft
Copy link
Contributor Author

@microsoft-github-policy-service agree

@jasongin
Copy link
Member

jasongin commented Apr 6, 2024

Thanks for the PR and bug report.

It looks like the CI is just complaining about some pedantic issues in the test code. For info about that check see https://github.com/microsoft/node-api-dotnet/blob/main/README-DEV.md#checkfix-formatting

Since it's test code, it would be OK to disable some of those warnings with #pragma warning disable

@jasongin jasongin merged commit 5d321c9 into microsoft:main Apr 8, 2024
24 checks passed
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