Skip to content

GetMemberWithSameMetadataDefinitionAs returns incorrect declaring type #67533

@MichalStrehovsky

Description

@MichalStrehovsky
  [FAIL] System.Reflection.Tests.TypeInfoTests.GetMemberWithSameMetadataDefinitionAs(openGenericType: typeof(System.Reflection.Tests.TI_GenericTypeWithAllMembers<>), closedGenericType: typeof(System.Reflection.Tests.TI_TypeDerivedFromGenericTypeWithAllMembers<int>), checkDeclaringType: False)
  System.ArgumentException : A MemberInfo that matches 'add_PrivateStaticEvent' could not be found. (Parameter 'member')
     at System.Reflection.Runtime.TypeInfos.RuntimeTypeInfo.GetMemberWithSameMetadataDefinitionAs(MemberInfo) + 0x154
     at System.Reflection.Tests.TypeInfoTests.GetMemberWithSameMetadataDefinitionAs(Type, Type, Boolean) + 0x70
     at System.Reflection.Tests!<BaseAddress>+0x6812ca
     at System.InvokeUtils.CallDynamicInvokeMethod(Object, IntPtr, IntPtr, IntPtr, Object, Object[], BinderBundle, Boolean, Boolean) + 0x150
  [FAIL] System.Reflection.Tests.TypeInfoTests.GetMemberWithSameMetadataDefinitionAs(openGenericType: typeof(System.Reflection.Tests.TI_GenericTypeWithAllMembers<>), closedGenericType: typeof(System.Reflection.Tests.TI_TypeDerivedFromGenericTypeWithAllMembersClosed), checkDeclaringType: False)
  System.ArgumentException : A MemberInfo that matches 'add_PrivateStaticEvent' could not be found. (Parameter 'member')
     at System.Reflection.Runtime.TypeInfos.RuntimeTypeInfo.GetMemberWithSameMetadataDefinitionAs(MemberInfo) + 0x154
     at System.Reflection.Tests.TypeInfoTests.GetMemberWithSameMetadataDefinitionAs(Type, Type, Boolean) + 0x70
     at System.Reflection.Tests!<BaseAddress>+0x6812ca
     at System.InvokeUtils.CallDynamicInvokeMethod(Object, IntPtr, IntPtr, IntPtr, Object, Object[], BinderBundle, Boolean, Boolean) + 0x150
  [FAIL] System.Reflection.Tests.TypeInfoTests.GetMemberWithSameMetadataDefinitionAs(openGenericType: typeof(System.Reflection.Tests.TI_GenericTypeWithAllMembers<>), closedGenericType: typeof(System.Reflection.Tests.TI_TypeDerivedFromGenericTypeWithAllMembers<System.Reflection.Tests.TypeInfoTests+ClassWithMultipleConstructors>), checkDeclaringType: False)
  System.ArgumentException : A MemberInfo that matches 'add_PrivateStaticEvent' could not be found. (Parameter 'member')
     at System.Reflection.Runtime.TypeInfos.RuntimeTypeInfo.GetMemberWithSameMetadataDefinitionAs(MemberInfo) + 0x154
     at System.Reflection.Tests.TypeInfoTests.GetMemberWithSameMetadataDefinitionAs(Type, Type, Boolean) + 0x70
     at System.Reflection.Tests!<BaseAddress>+0x6812ca
     at System.InvokeUtils.CallDynamicInvokeMethod(Object, IntPtr, IntPtr, IntPtr, Object, Object[], BinderBundle, Boolean, Boolean) + 0x150
  [FAIL] System.Reflection.Tests.TypeInfoTests.GetMemberWithSameMetadataDefinitionAs(openGenericType: typeof(System.Reflection.Tests.TI_GenericTypeWithAllMembers), closedGenericType: typeof(System.Reflection.Tests.TI_GenericTypeWithAllMembers), checkDeclaringType: True)
  'add_PrivateStaticEvent' doesn't have the right DeclaringType
  Expected: True
  Actual:   False
     at System.Reflection.Tests.TypeInfoTests.GetMemberWithSameMetadataDefinitionAs(Type, Type, Boolean) + 0x199
     at System.Reflection.Tests!<BaseAddress>+0x6812ca
     at System.InvokeUtils.CallDynamicInvokeMethod(Object, IntPtr, IntPtr, IntPtr, Object, Object[], BinderBundle, Boolean, Boolean) + 0x150
  [FAIL] System.Reflection.Tests.TypeInfoTests.GetMemberWithSameMetadataDefinitionAs(openGenericType: typeof(System.Reflection.Tests.TI_GenericTypeWithAllMembers<>), closedGenericType: typeof(System.Reflection.Tests.TI_GenericTypeWithAllMembers), checkDeclaringType: True)
  'add_PrivateStaticEvent' doesn't have the right DeclaringType
  Expected: True
  Actual:   False
     at System.Reflection.Tests.TypeInfoTests.GetMemberWithSameMetadataDefinitionAs(Type, Type, Boolean) + 0x199
     at System.Reflection.Tests!<BaseAddress>+0x6812ca
     at System.InvokeUtils.CallDynamicInvokeMethod(Object, IntPtr, IntPtr, IntPtr, Object, Object[], BinderBundle, Boolean, Boolean) + 0x150

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions