mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Macros] Add support for explicit generic arguments of macros.
Enable type checking support for explicitly specifying generic arguments to a macro, e.g., `#stringify<Double>(1 + 2)`. To do so, introduce a new kind of constraint that performs explicit argument matching against the generic parameters of a macro only after the overload is chosen.
This commit is contained in:
@@ -5611,6 +5611,13 @@ private:
|
||||
Type type1, Type type2, TypeMatchOptions flags,
|
||||
ConstraintLocatorBuilder locator);
|
||||
|
||||
/// Simplify an explicit generic argument constraint by equating the
|
||||
/// opened generic types of the bound left-hand type variable to the
|
||||
/// pack type on the right-hand side.
|
||||
SolutionKind simplifyExplicitGenericArgumentsConstraint(
|
||||
Type type1, Type type2, TypeMatchOptions flags,
|
||||
ConstraintLocatorBuilder locator);
|
||||
|
||||
public: // FIXME: Public for use by static functions.
|
||||
/// Simplify a conversion constraint with a fix applied to it.
|
||||
SolutionKind simplifyFixConstraint(ConstraintFix *fix, Type type1, Type type2,
|
||||
|
||||
Reference in New Issue
Block a user