static bool isValidOverload(CanTypeSet &overloads, const ValueDecl *VD) { if (!isOverloadable(VD)) return overloads.empty(); if (overloads.count(VD->getType()->getCanonicalType())) return false; return true; }
/// Updates \p overloads with the types of the given decls. /// /// \returns true if all of the given decls are overloadable, false if not. static bool updateOverloadSet(CanTypeSet &overloads, ArrayRef<ValueDecl *> decls) { for (auto result : decls) { if (!isOverloadable(result)) return false; if (!result->hasType()) continue; overloads.insert(result->getType()->getCanonicalType()); } return true; }
static bool isValidOverload(CanTypeSet &overloads, const ValueDecl *VD) { if (!isOverloadable(VD)) return overloads.empty(); return !overloads.count(VD->getInterfaceType()->getCanonicalType()); }