dotnet / dotnet/linker

Analyzer assumes Roslyn API has `nullable` enabled when it is not

Open
#2,687 2 comments 0 reactions 0 assignees View on GitHub
area-Analyzers
Dominant language
C#
Stars
392
Forks
128
Avg merge
2d 10h
Merged PRs (30d)
2

Description

Roslyn API doesn't use nullable types and will return null on properties and fields that aren't annotated with the `?`. The linker assumes that fields will not be null, and those issues tend to appear most frequently with COM interop when a type doesn't have a namespace.

Maui has run into a few issues with this already, and it seems to be the main cause of null references in the analyzer. We should fully address this instead of fixing it bit by bit as issues are hit.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.