private IEntity ResolveAmbiguousTypeReference(ReferenceExpression node, Ambiguous candidates)
{
List<IEntity> matches = GetMatchesByGenericity(node, candidates);
if (matches.Count > 1)
{
PreferInternalEntitiesOverNonInternal(matches);
}
if (matches.Count == 1)
{
Bind(node, matches[0]);
}
else
{
Bind(node, new Ambiguous(matches));
}
return node.Entity;
}