Skip to content

Commit 14c073b

Browse files
committed
Remove friend references to TypeChecker
TypeChecker has no friends
1 parent 4be0e4a commit 14c073b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

include/swift/AST/Decl.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3597,7 +3597,6 @@ class EnumDecl final : public NominalTypeDecl {
35973597

35983598
friend class EnumRawValuesRequest;
35993599
friend class EnumRawTypeRequest;
3600-
friend class TypeChecker;
36013600

36023601
public:
36033602
EnumDecl(SourceLoc EnumLoc, Identifier Name, SourceLoc NameLoc,
@@ -3883,7 +3882,6 @@ class ClassDecl final : public NominalTypeDecl {
38833882
friend class EmittedMembersRequest;
38843883
friend class HasMissingDesignatedInitializersRequest;
38853884
friend class InheritsSuperclassInitializersRequest;
3886-
friend class TypeChecker;
38873885

38883886
public:
38893887
ClassDecl(SourceLoc ClassLoc, Identifier Name, SourceLoc NameLoc,
@@ -4258,7 +4256,6 @@ class ProtocolDecl final : public NominalTypeDecl {
42584256
friend class ProtocolRequiresClassRequest;
42594257
friend class ExistentialConformsToSelfRequest;
42604258
friend class ExistentialTypeSupportedRequest;
4261-
friend class TypeChecker;
42624259

42634260
public:
42644261
ProtocolDecl(DeclContext *DC, SourceLoc ProtocolLoc, SourceLoc NameLoc,

lib/Sema/ConstraintSystem.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,8 +2229,15 @@ class ConstraintSystem {
22292229
/// constraint system for further exploration.
22302230
void applySolution(const Solution &solution);
22312231

2232-
// FIXME: Allows the type checker to apply solutions.
2233-
friend class swift::TypeChecker;
2232+
// FIXME: Perhaps these belong on ConstraintSystem itself.
2233+
friend Optional<BraceStmt *>
2234+
swift::TypeChecker::applyFunctionBuilderBodyTransform(FuncDecl *func,
2235+
Type builderType);
2236+
friend Optional<SolutionApplicationTarget>
2237+
swift::TypeChecker::typeCheckExpression(SolutionApplicationTarget &target,
2238+
bool &unresolvedTypeExprs,
2239+
TypeCheckExprOptions options,
2240+
ExprTypeCheckListener *listener);
22342241

22352242
/// Emit the fixes computed as part of the solution, returning true if we were
22362243
/// able to emit an error message, or false if none of the fixits worked out.

0 commit comments

Comments
 (0)