Skip to content

Commit e22d23c

Browse files
committed
Update to check if GenericType instead ValueTuple
1 parent 61f3e09 commit e22d23c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace System.Reflection
1313
public sealed class NullabilityInfoContext
1414
{
1515
private const string CompilerServicesNameSpace = "System.Runtime.CompilerServices";
16-
private const string ValueTuple = nameof(System.ValueTuple);
1716
private readonly Dictionary<Module, NotAnnotatedStatus> _publicOnlyModules = new();
1817
private readonly Dictionary<MemberInfo, NullabilityState> _context = new();
1918

@@ -388,7 +387,7 @@ private NullabilityInfo GetNullabilityInfo(MemberInfo memberInfo, Type type, ILi
388387
{
389388
Type t = Nullable.GetUnderlyingType(genericArguments[i]) ?? genericArguments[i];
390389

391-
if (!t.IsValueType || t.Name.StartsWith(ValueTuple))
390+
if (!t.IsValueType || t.IsGenericType)
392391
{
393392
offset++;
394393
}

0 commit comments

Comments
 (0)