Skip to content

Commit

Permalink
Additional check
Browse files Browse the repository at this point in the history
  • Loading branch information
cston committed May 6, 2021
1 parent a9449a9 commit 366686a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private static MethodGroupResolution ResolveDelegateOrFunctionPointerMethodGroup
return (signature, true, new CallingConventionInfo(signature.CallingConvention, signature.GetCallingConventionModifiers()));
}

var delegateType = (type.SpecialType == SpecialType.System_Delegate) ?
var delegateType = (type.SpecialType == SpecialType.System_Delegate) && methodGroup.Syntax.IsFeatureEnabled(MessageID.IDS_FeatureNullableReferenceTypes) ?
// https://github.com/dotnet/roslyn/issues/52869: Avoid calculating the delegate type multiple times during conversion.
_binder.GetMethodGroupDelegateType(methodGroup, ref useSiteInfo) :
type.GetDelegateType();
Expand Down

0 comments on commit 366686a

Please sign in to comment.