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

Make sure PropertyNames is always populated in AddUserDefinedProperty() #214

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

Numpsy
Copy link
Contributor

@Numpsy Numpsy commented Nov 16, 2024

The way the code was set up should mean that PropertyNames is never null in UserDefinedProperties containers, so it should never be null when it gets to the PropertyNames.Any. However, the compiler can't tell that, so you get nullability warnings in the build

It might be safe to ! the references here, but then - I don't think there should be any problem with just creating PropertyNames here so maybe that's the safer approach to take.

@jeremy-visionaid
Copy link
Collaborator

Not having designed it, I really couldn't say about the intent, so I'm inclined to just merge it and silence the warnings. It's at least no worse than the status quo... Thanks for the PR!

@jeremy-visionaid jeremy-visionaid merged commit a23eecf into ironfede:master Nov 17, 2024
2 checks passed
@Numpsy Numpsy deleted the avoid_null branch November 17, 2024 11:14
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