-
Notifications
You must be signed in to change notification settings - Fork 126
Closed
Labels
Milestone
Description
class C<TOuter>
{
/// <summary>
/// <remarks>
/// <see cref="CRequires{TOuter}.IsIt"/> This causes NullRef
/// </remarks>
/// </summary>
static CRequires<TOuter> Value => throw new Exception();
}
// This produces a warning as it should
class CRequires<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TInner> { public static bool IsIt => false; }The NullRef happens because we try to validate the generic instantiation (matching annotations), and in this case it leads to us trying to produce a warning on the cref. But the type argument given to us by Roslyn doesn't have a containing type (not sure why), and so we fail to produce a display name for it (NullRef).
The fix is to actually disallow analysis of any symbol inside a cref, we don't want to produce warnings for that. We already did that for some crefs, but not all.
Reactions are currently unavailable