Skip to content

Commit 61f3e09

Browse files
committed
Use StartsWith instead Contains
1 parent 842e286 commit 61f3e09

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ private NullabilityInfo GetNullabilityInfo(MemberInfo memberInfo, Type type, ILi
388388
{
389389
Type t = Nullable.GetUnderlyingType(genericArguments[i]) ?? genericArguments[i];
390390

391-
if (!t.IsValueType || t.Name.Contains(ValueTuple))
391+
if (!t.IsValueType || t.Name.StartsWith(ValueTuple))
392392
{
393393
offset++;
394394
}

src/libraries/System.Runtime/tests/System/Reflection/NullabilityInfoContextTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ public static IEnumerable<object[]> NestedGenericsReturnParameterData()
865865

866866
[Theory]
867867
[MemberData(nameof(NestedGenericsReturnParameterData))]
868+
[SkipOnMono("Nullability attributes trimmed on Mono")]
868869
public void NestedGenericsReturnParameterTest(string methodName, NullabilityState enumState, NullabilityState innerTupleState,
869870
NullabilityState intState, NullabilityState outerTupleState, NullabilityState stringState, NullabilityState objectState)
870871
{

0 commit comments

Comments
 (0)