未验证 提交 10418282 编写于 作者: B Buyaa Namnan 提交者: GitHub

Remove unnecessary call to type.GetFields, add test case for literal field (#77497)

上级 8b083f2a
......@@ -153,8 +153,6 @@ public override byte[] ResolveSignature(int metadataToken)
Type declaringType = ResolveType(tkDeclaringType, genericTypeArguments, genericMethodArguments);
declaringType.GetFields();
try
{
return declaringType.GetField(fieldName,
......
......@@ -41,6 +41,7 @@ namespace System.Reflection.Tests
{
public class ModuleTests
{
public const string ConstField = "Value";
public static Module Module => typeof(ModuleTests).Module;
public static Module TestModule => typeof(TestModule.Dummy).Module;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册