Bug fix. It is not valid to call TypeWrapper.IsInterfaceOrInterfaceArray on an UnloadableTypeWrapper.

This commit is contained in:
jfrijters 2012-07-20 08:47:34 +00:00
Родитель 6147f462ae
Коммит 29cb564480
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -706,7 +706,7 @@ sealed class InstructionState
{
// HACK because of the way interfaces references works, if baseType
// is an interface or array of interfaces, any reference will be accepted
if(baseType.IsInterfaceOrInterfaceArray && !type.IsPrimitive)
if((baseType.IsUnloadable || baseType.IsInterfaceOrInterfaceArray) && !type.IsPrimitive)
{
return type;
}
@ -904,7 +904,7 @@ struct StackState
{
// HACK because of the way interfaces references works, if baseType
// is an interface or array of interfaces, any reference will be accepted
if(baseType.IsInterfaceOrInterfaceArray && !type.IsPrimitive)
if((baseType.IsUnloadable || baseType.IsInterfaceOrInterfaceArray) && !type.IsPrimitive)
{
return type;
}