mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Constraint System] Evaluable hashability during constraint generation.
This commit is contained in:
@@ -4459,11 +4459,8 @@ public:
|
||||
|
||||
private:
|
||||
/// Add the constraints needed to bind an overload's type variable.
|
||||
void bindOverloadType(
|
||||
const SelectedOverload &overload, Type boundType,
|
||||
ConstraintLocator *locator, DeclContext *useDC,
|
||||
llvm::function_ref<void(unsigned int, Type, ConstraintLocator *)>
|
||||
verifyThatArgumentIsHashable);
|
||||
void bindOverloadType(const SelectedOverload &overload, Type boundType,
|
||||
ConstraintLocator *locator, DeclContext *useDC);
|
||||
|
||||
/// Describes a direction of optional wrapping, either increasing optionality
|
||||
/// or decreasing optionality.
|
||||
@@ -4940,6 +4937,12 @@ public:
|
||||
Expr *buildTypeErasedExpr(Expr *expr, DeclContext *dc, Type contextualType,
|
||||
ContextualTypePurpose purpose);
|
||||
|
||||
/// Ensures that the given argument type conforms to the `Hashable` protocol
|
||||
/// and adds a conformance constraint if it does not. This is required for
|
||||
/// arguments used as key path components, as they serve as lookup keys.
|
||||
void verifyThatArgumentIsHashable(unsigned index, Type argType,
|
||||
ConstraintLocator *locator, SourceLoc loc);
|
||||
|
||||
private:
|
||||
/// Determines whether or not a given conversion at a given locator requires
|
||||
/// the creation of a temporary value that's only valid for a limited scope.
|
||||
|
||||
Reference in New Issue
Block a user