public IEnumerable <DMethod> FindFitting(ResolutionContext ctxt, CodeLocation currentLocation, ISemantic firstArgument, int nameFilterHash = 0) { if (firstArgument is MemberSymbol) { firstArgument = DResolver.StripMemberSymbols(firstArgument as AbstractType); } if (firstArgument is PrimitiveType && (firstArgument as PrimitiveType).TypeToken == DSharp.Parser.DTokens.Void) { return(null); } // Then filter out methods which cannot be accessed in the current context // (like when the method is defined in a module that has not been imported) var mv = new UfcsMatchScanner(ctxt, CachedMethods, firstArgument, nameFilterHash); mv.IterateThroughScopeLayers(currentLocation); return(mv.filteredMethods); }
public IEnumerable<DMethod> FindFitting(ResolutionContext ctxt, CodeLocation currentLocation, ISemantic firstArgument, int nameFilterHash = 0) { if(firstArgument is MemberSymbol) firstArgument = DResolver.StripMemberSymbols(firstArgument as AbstractType); if (firstArgument is PrimitiveType && (firstArgument as PrimitiveType).TypeToken == DSharp.Parser.DTokens.Void) return null; // Then filter out methods which cannot be accessed in the current context // (like when the method is defined in a module that has not been imported) var mv = new UfcsMatchScanner(ctxt, CachedMethods, firstArgument, nameFilterHash); mv.IterateThroughScopeLayers(currentLocation); return mv.filteredMethods; }