зеркало из https://github.com/mono/ikvm-fork.git
Allow Type.GetTypeCode() to work with missing mscorlib (for primitive types).
This commit is contained in:
Родитель
0d481c9d54
Коммит
1319f75273
|
@ -1300,7 +1300,7 @@ namespace IKVM.Reflection
|
|||
{
|
||||
return TypeCode.Empty;
|
||||
}
|
||||
if (type.IsEnum)
|
||||
if (!type.__IsMissing && type.IsEnum)
|
||||
{
|
||||
type = type.GetEnumUnderlyingType();
|
||||
}
|
||||
|
@ -1369,6 +1369,10 @@ namespace IKVM.Reflection
|
|||
{
|
||||
return TypeCode.String;
|
||||
}
|
||||
else if (type.__IsMissing)
|
||||
{
|
||||
throw new MissingMemberException(type);
|
||||
}
|
||||
else
|
||||
{
|
||||
return TypeCode.Object;
|
||||
|
|
Загрузка…
Ссылка в новой задаче