Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CLR/Core/CLR_RT_HeapBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 3 additions & 1 deletion src/CLR/Core/TypeSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down