diff --git a/src/CLR/Core/CLR_RT_HeapBlock.cpp b/src/CLR/Core/CLR_RT_HeapBlock.cpp index 98b3572682..ae1877f779 100644 --- a/src/CLR/Core/CLR_RT_HeapBlock.cpp +++ b/src/CLR/Core/CLR_RT_HeapBlock.cpp @@ -791,7 +791,7 @@ bool CLR_RT_HeapBlock::TypeDescriptorsMatch( // If the *actual* object is a closed-generic (even though boxed as CLASS), // it will have m_handlerGenericType set. Promote it to GENERICINST. - if (actualDataType == DATATYPE_CLASS && actualType.m_handlerGenericType.data != CLR_EmptyToken) + if (actualDataType == DATATYPE_CLASS && NANOCLR_INDEX_IS_VALID(actualType.m_handlerGenericType)) { actualDataType = DATATYPE_GENERICINST; } diff --git a/src/CLR/Core/TypeSystem.cpp b/src/CLR/Core/TypeSystem.cpp index 73e0601d67..1b04b3bc6f 100644 --- a/src/CLR/Core/TypeSystem.cpp +++ b/src/CLR/Core/TypeSystem.cpp @@ -2269,7 +2269,9 @@ HRESULT CLR_RT_TypeDescriptor::InitializeFromSignatureToken( // !T: ask the CLR to map that slot into the *actual* argument CLR_RT_TypeDef_Index td; NanoCLRDataType dt; - assm->FindGenericParamAtTypeSpec(caller->genericType->data, elem.GenericParamPosition, td, dt); + + g_CLR_RT_TypeSystem.m_assemblies[caller->genericType->Assembly() - 1] + ->FindGenericParamAtTypeSpec(caller->genericType->data, elem.GenericParamPosition, td, dt); this->InitializeFromTypeDef(td); } else if (elem.DataType == DATATYPE_MVAR)