private bool HostsSecondTypePoint(FuzzyMethod alt) { return //every freaking alt references the same target, so I have to comment this // alt.Target == _second || alt.ReturnValue == _second || alt.Args.Any(altArg => altArg == _second); }
public MethodBindingToOneOfAlternativesLink(FuzzyMethodBinding binding, FuzzyType first, FuzzyType second) : base(first, second) { _first = first; _second = second; _binding = binding; // first of all check whether _second is Arg or RetVal of one of the alts var secondPointHost = _binding.Alternatives.SingleOrDefault(alt => HostsSecondTypePoint(alt)); // if it's not, then _second is the Target, i.e. we can take it from any alt we wish for now _alt = secondPointHost ?? _binding.Alternatives.First(); }