Support mscorlib that forwards System.Enum and System.ValueType to another assembly (as .NETCore reference mscorlib does).

This commit is contained in:
jfrijters 2012-07-12 13:29:08 +00:00
Родитель d2df488ac0
Коммит d9df2658bf
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -1909,7 +1909,10 @@ namespace IKVM.Reflection
private bool ResolvePotentialEnumOrValueType()
{
if (this.Assembly == this.Universe.Mscorlib || this.Assembly.GetName().Name.Equals("mscorlib", StringComparison.OrdinalIgnoreCase))
if (this.Assembly == this.Universe.Mscorlib
|| this.Assembly.GetName().Name.Equals("mscorlib", StringComparison.OrdinalIgnoreCase)
// check if mscorlib forwards the type (.NETCore profile reference mscorlib forwards System.Enum and System.ValueType to System.Runtime.dll)
|| this.Universe.Mscorlib.FindType(new TypeName(__Namespace, __Name)) == this)
{
typeFlags = (typeFlags & ~TypeFlags.PotentialEnumOrValueType) | TypeFlags.EnumOrValueType;
return true;