Skip to content

Commit eb092c9

Browse files
committed
[ConstraintSystem] Make typeCheckParameterDefault a friend
`typeCheckParameterDefault` needs access to `applySolution` in order to apply a solution found in `inference from defaults` mode.
1 parent c2831cd commit eb092c9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/swift/Sema/ConstraintSystem.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ Optional<constraints::SolutionApplicationTarget>
8080
typeCheckExpression(constraints::SolutionApplicationTarget &target,
8181
OptionSet<TypeCheckExprFlags> options);
8282

83+
Type typeCheckParameterDefault(Expr *&, DeclContext *, Type, bool);
84+
8385
} // end namespace TypeChecker
8486

8587
} // end namespace swift
@@ -3045,6 +3047,10 @@ class ConstraintSystem {
30453047
swift::TypeChecker::typeCheckExpression(
30463048
SolutionApplicationTarget &target, OptionSet<TypeCheckExprFlags> options);
30473049

3050+
friend Type swift::TypeChecker::typeCheckParameterDefault(Expr *&,
3051+
DeclContext *, Type,
3052+
bool);
3053+
30483054
/// Emit the fixes computed as part of the solution, returning true if we were
30493055
/// able to emit an error message, or false if none of the fixits worked out.
30503056
bool applySolutionFixes(const Solution &solution);

0 commit comments

Comments
 (0)