-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fixes: some null annotation #6754
fixes: some null annotation #6754
Conversation
Can be null? Avalonia/src/Avalonia.Controls/Application.cs Lines 101 to 123 in a2ca358
|
6f6767b
to
2264402
Compare
Note that C# now supports This wasn't supported when a lot of this code was written which is why it wasn't used before. Regarding the warnings that are due to a C# bug - I'd suggest leaving them as warnings for now - we're hopefully going to be updating our SDK soon which should fix them. |
@workgroupengineering we have updated SDK to 5.0, should it be reviewed? |
I am unsure how to correct these warnings. ##[warning]/home/vsts/work/1/s/src/Avalonia.Controls/Application.cs(64,16): warning CS8618: Non-nullable property 'FocusManager' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/vsts/work/1/s/src/Avalonia.Controls/Avalonia.Controls.csproj]
##[warning]/home/vsts/work/1/s/src/Avalonia.Controls/Application.cs(64,16): warning CS8618: Non-nullable property 'InputManager' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/vsts/work/1/s/src/Avalonia.Controls/Avalonia.Controls.csproj] before the RegisterServices method is called they can have a null value. I do not know whether to suppress the warning or declare them as nullable. |
…notation_And_Warning fixes: some null annotation
What does the pull request do?
What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues