Closed nightroman closed 3 years ago
And another similar but different warning (not included into the zip, found in another project).
Should I submit a separate issue or this description is enough?
warning CS8604: Possible null reference argument for parameter 'snapshot'
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.1.0.0")]
public partial class ProjectById_ProjectById_ProjectFromProjectEntityMapper
: global::StrawberryShake.IEntityMapper<global::Nexar.Client.State.ProjectEntity, ProjectById_ProjectById_Project>
{
public ProjectById_ProjectById_Project Map(
global::Nexar.Client.State.ProjectEntity entity,
global::StrawberryShake.IEntityStoreSnapshot? snapshot = null) // <--- `snapshot` may be null
{
return new ProjectById_ProjectById_Project(
entity.Name,
entity.ProjectId,
entity.Description,
MapIProjectById_ProjectById_Design(
entity.Design,
snapshot)); // <--- warning CS8604: Possible null reference argument for parameter 'snapshot'
}
Thanks for reporting!
Strawberry Shake generates with warning CS8602: Dereference of a possibly null reference.
Strawberry Shake 11.1.0-rc.2
ref: Slack thread
Summary
Strawberry Shake generates code with warnings like:
Steps to reproduce
Please find attached the sample project.
Change to its directory and run
Actual result
The build produces the mentioned warning CS8602.
Expected result
The build succeeds without warnings.
Notes
Generated code snippet with a warning (see added comments)
Secondary issue
In the Visual Studio output window double click on this warning does not navigate to the source as expected. Is it something wrong with warning source information formatting?
_210325_b0-HCSS.zip