mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CSSimplify] Propagate contextual types to pack expansion variables
If there are explicit generic arguments that fully resolves the pack expansion, let's bind opened pack expansion to its contextual type early (while resolving pack expansion variable), doing so helps with performance and diagnostics.
This commit is contained in:
committed by
Pavel Yaskevich
parent
943ef19a1d
commit
cbfec20f08
@@ -3892,11 +3892,11 @@ public:
|
||||
/// variable representing a pack expansion type, let's resolve the expansion.
|
||||
///
|
||||
/// \param typeVar The type variable representing pack expansion type.
|
||||
/// \param locator The locator associated with contextual type.
|
||||
/// \param contextualType The contextual type this pack expansion variable
|
||||
/// would be bound/equated to.
|
||||
///
|
||||
/// \returns `true` if pack expansion has been resolved, `false` otherwise.
|
||||
bool resolvePackExpansion(TypeVariableType *typeVar,
|
||||
ConstraintLocatorBuilder locator);
|
||||
bool resolvePackExpansion(TypeVariableType *typeVar, Type contextualType);
|
||||
|
||||
/// Assign a fixed type to the given type variable.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user