// supplied by RyuJIT is a concrete instantiation.
if (type != method.OwningType)
{
- Debug.Assert(type.HasSameTypeDefinition(method.OwningType));
- Instantiation methodInst = method.Instantiation;
- method = _compilation.TypeSystemContext.GetMethodForInstantiatedType(method.GetTypicalMethodDefinition(), (InstantiatedType)type);
- if (methodInst.Length > 0)
+ if (type.IsArray)
{
- method = method.MakeInstantiatedMethod(methodInst);
+ method = ((ArrayType)type).GetArrayMethod(((ArrayMethod)method).Kind);
+ }
+ else
+ {
+ Debug.Assert(type.HasSameTypeDefinition(method.OwningType));
+ Instantiation methodInst = method.Instantiation;
+ method = _compilation.TypeSystemContext.GetMethodForInstantiatedType(method.GetTypicalMethodDefinition(), (InstantiatedType)type);
+ if (methodInst.Length > 0)
+ {
+ method = method.MakeInstantiatedMethod(methodInst);
+ }
}
}
}