public bool CanBeReachedFrom(Node anchor, IType expectedType, IType actualType) { bool byDowncast; if (!_typeSystemServices.Instance.CanBeReachedFrom(expectedType, actualType, out byDowncast)) { return(false); } if (byDowncast) { _warnings.Instance.Add(CompilerWarningFactory.ImplicitDowncast(anchor, expectedType, actualType)); } return(true); }