зеркало из https://github.com/mono/ikvm-fork.git
Bug fix. MethodInfo should return PreserveSigAttribute pseudo custom attribute if MethodImplAttributes.PreserveSig is set.
This commit is contained in:
Родитель
262a07cd5f
Коммит
ca7a94e446
|
@ -240,6 +240,13 @@ namespace IKVM.Reflection.Reader
|
||||||
{
|
{
|
||||||
CreateDllImportPseudoCustomAttribute(list);
|
CreateDllImportPseudoCustomAttribute(list);
|
||||||
}
|
}
|
||||||
|
if ((GetMethodImplementationFlags() & MethodImplAttributes.PreserveSig) != 0
|
||||||
|
&& (attributeType == null || attributeType.IsAssignableFrom(module.universe.System_Runtime_InteropServices_PreserveSigAttribute)))
|
||||||
|
{
|
||||||
|
Type type = module.universe.System_Runtime_InteropServices_PreserveSigAttribute;
|
||||||
|
ConstructorInfo constructor = type.GetPseudoCustomAttributeConstructor();
|
||||||
|
list.Add(new CustomAttributeData(module, constructor, Empty<object>.Array, null));
|
||||||
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче