Allow Type.GetTypeCode() to work with missing mscorlib (for primitive types).

This commit is contained in:
jfrijters 2011-03-09 06:01:52 +00:00
Родитель 0d481c9d54
Коммит 1319f75273
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -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;