OverloadConstraint
struct OverloadConstraint : DisjunctiveConstraintProtocol, Hashable, Sendable
extension OverloadConstraint: CustomStringConvertible
A constraint specifying that a name expression refers to one of several declarations, depending on its type.
-
The overloaded expression.
Declaration
Swift
let overloadedExpr: NameExpr.ID -
The type of
self.overloadedExpr.Declaration
Swift
private(set) var overloadedExprType: AnyType { get } -
The overloaded candidates.
Declaration
Swift
private(set) var choices: [Predicate] { get } -
Declaration
Swift
let origin: ConstraintOrigin -
Creates an instance with the given properties.
Requires
candidates.count >= 2Declaration
Swift
init( _ expr: NameExpr.ID, withType type: AnyType, refersToOneOf choices: [Predicate], origin: ConstraintOrigin ) -
-
A candidate in an overload constraint.
See moreDeclaration
Swift
struct Predicate : DisjunctiveConstraintTerm, Hashableextension OverloadConstraint.Predicate: CustomStringConvertible -
Declaration
Swift
var description: String { get }
View on GitHub