void ProcessMethodOverride(InternalMethod entity, IMethod baseMethod)
{
CallableSignature baseSignature = TypeSystemServices.GetOverriddenSignature(baseMethod, entity);
if (TypeSystemServices.IsUnknown(entity.ReturnType))
{
entity.Method.ReturnType = CodeBuilder.CreateTypeReference(entity.Method.LexicalInfo, baseSignature.ReturnType);
}
else if (baseSignature.ReturnType != entity.ReturnType)
{
Error(CompilerErrorFactory.InvalidOverrideReturnType(
entity.Method.ReturnType,
baseMethod,
baseMethod.ReturnType,
entity.ReturnType));
}
SetOverride(entity, baseMethod);
}