(new Entry()).Style = null; compiles without error in .Net 8 and earlier but in .NET 9 it produces a warning warning CS8625: Cannot convert null literal to non-nullable reference type.
Steps to Reproduce
Create a new MAUI App
Add (new Entry()).Style = null; somewhere (I did it in OnCounterClicked, but anywhere syntactically correct will do.
On .NET 9 it will emit the warning on 8 it will compile.
I did this on .NET 9 RC2 but reported RC1 below because there's no pulldown value for RC2 yet.
Link to public reproduction project repository
No response
Version with bug
9.0.0-rc.1.24453.9
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.91 SR9.1
Affected platforms
Windows, I was not able test on other platforms
Affected platform versions
all
Did you find any workaround?
Do not treat warnings as errors and just ignore the warning.
This issue has been verified using Visual Studio 17.12.0 Preview 3(9.0.0-rc.1.24453.9 ). Can repro this issue , works fine on 17.12.0 Preview 2.1(8.0.91)
Description
(new Entry()).Style = null;
compiles without error in .Net 8 and earlier but in .NET 9 it produces a warningwarning CS8625: Cannot convert null literal to non-nullable reference type.
Steps to Reproduce
(new Entry()).Style = null;
somewhere (I did it inOnCounterClicked
, but anywhere syntactically correct will do.I did this on .NET 9 RC2 but reported RC1 below because there's no pulldown value for RC2 yet.
Link to public reproduction project repository
No response
Version with bug
9.0.0-rc.1.24453.9
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.91 SR9.1
Affected platforms
Windows, I was not able test on other platforms
Affected platform versions
all
Did you find any workaround?
Do not treat warnings as errors and just ignore the warning.
Relevant log output
No response