Skip to content

Commit 2e3632c

Browse files
sbomergithub-actions
authored andcommitted
Update test in response to bug fix
1 parent 8c45b3d commit 2e3632c

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/ExtensionMembersDataFlow.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ static void TestExtensionPropertyMismatch()
9898
instance.ExtensionMembersPropertyMismatch = GetWithFields();
9999
}
100100

101-
[UnexpectedWarning("IL2072", "ExtensionMembersPropertyAnnotatedAccessor", nameof(DataFlowTypeExtensions.RequiresPublicMethods), Tool.Trimmer | Tool.NativeAot, "https://github.com/dotnet/roslyn/issues/80017")]
102101
static void TestExtensionPropertyAnnotatedAccessor()
103102
{
104103
var instance = GetWithFields();
@@ -123,15 +122,13 @@ static void TestExtensionPropertyRequires()
123122
_ = GetWithFields().ExtensionMembersPropertyRequires;
124123
}
125124

126-
[UnexpectedWarning("IL2072", "ExtensionMembersPropertyConflict", nameof(DataFlowTypeExtensions.RequiresPublicFields), Tool.Trimmer | Tool.NativeAot, "https://github.com/dotnet/roslyn/issues/80017")]
127125
static void TestExtensionPropertyConflict()
128126
{
129127
var instance = GetWithFields();
130128
instance.ExtensionMembersPropertyConflict.RequiresPublicFields();
131129
instance.ExtensionMembersPropertyConflict = GetWithFields();
132130
}
133131

134-
[UnexpectedWarning("IL2072", nameof(ExtensionMembers.op_Addition), nameof(DataFlowTypeExtensions.RequiresPublicFields), Tool.Trimmer | Tool.NativeAot, "https://github.com/dotnet/roslyn/issues/80017")]
135132
[UnexpectedWarning("IL2062", nameof(DataFlowTypeExtensions.RequiresPublicFields), Tool.Analyzer, "https://github.com/dotnet/runtime/issues/119110")]
136133
static void TestExtensionOperators()
137134
{
@@ -143,14 +140,14 @@ static void TestExtensionOperators()
143140

144141
[ExpectedWarning("IL2072", nameof(GetWithMethods), nameof(ExtensionMembers.op_Subtraction), Tool.Trimmer | Tool.NativeAot, "https://github.com/dotnet/runtime/issues/119110")]
145142
[ExpectedWarning("IL2072", nameof(GetWithMethods), nameof(ExtensionMembers.op_Subtraction), Tool.Trimmer | Tool.NativeAot, "https://github.com/dotnet/runtime/issues/119110")]
146-
[ExpectedWarning("IL2072", nameof(ExtensionMembers.op_Subtraction), nameof(DataFlowTypeExtensions.RequiresPublicFields), Tool.Trimmer | Tool.NativeAot, "https://github.com/dotnet/runtime/issues/119110")]
147-
[UnexpectedWarning("IL2062", nameof(DataFlowTypeExtensions.RequiresPublicFields), Tool.Analyzer, "https://github.com/dotnet/runtime/issues/119110")]
143+
[ExpectedWarning("IL2072", nameof(ExtensionMembers.op_Subtraction), nameof(DataFlowTypeExtensions.RequiresPublicMethods), Tool.Trimmer | Tool.NativeAot, "https://github.com/dotnet/runtime/issues/119110")]
144+
[UnexpectedWarning("IL2062", nameof(DataFlowTypeExtensions.RequiresPublicMethods), Tool.Analyzer, "https://github.com/dotnet/runtime/issues/119110")]
148145
static void TestExtensionOperatorsMismatch()
149146
{
150147
var a = GetWithMethods();
151148
var b = GetWithMethods();
152149
var c = a - b;
153-
c.RequiresPublicFields();
150+
c.RequiresPublicMethods();
154151
}
155152

156153
[return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)]
@@ -237,7 +234,7 @@ public Type ExtensionMembersPropertyAnnotatedAccessor
237234

238235
public Type ExtensionMembersPropertyAnnotatedAccessorMismatch
239236
{
240-
[ExpectedWarning("IL2073", nameof(ExtensionMembersDataFlow.GetWithFields), Tool.Analyzer, "https://github.com/dotnet/roslyn/issues/80017")]
237+
[ExpectedWarning("IL2073", nameof(ExtensionMembersDataFlow.GetWithFields))]
241238
[return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)]
242239
get => ExtensionMembersDataFlow.GetWithFields();
243240

@@ -276,7 +273,7 @@ public Type ExtensionMembersPropertyConflict
276273

277274
[ExpectedWarning("IL2067", "left", nameof(DataFlowTypeExtensions.RequiresPublicMethods))]
278275
[ExpectedWarning("IL2067", "right", nameof(DataFlowTypeExtensions.RequiresPublicMethods))]
279-
[ExpectedWarning("IL2073", nameof(ExtensionMembersDataFlow.GetWithMethods), Tool.Analyzer, "https://github.com/dotnet/roslyn/issues/80017")]
276+
[ExpectedWarning("IL2073", nameof(ExtensionMembersDataFlow.GetWithMethods))]
280277
[return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)]
281278
public static Type operator -(
282279
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] Type left,

0 commit comments

Comments
 (0)