@@ -47,7 +47,7 @@ class GenericTypeResolver {
47
47
// / \returns The resolved generic type parameter type, which may be \c gp.
48
48
virtual Type resolveGenericTypeParamType (GenericTypeParamType *gp) = 0;
49
49
50
- // / Resolve a reference to a member within a dependent type.
50
+ // / Resolve a qualified reference to a type member within a dependent type.
51
51
// /
52
52
// / \param baseTy The base of the member access.
53
53
// / \param baseRange The source range covering the base type.
@@ -60,7 +60,7 @@ class GenericTypeResolver {
60
60
SourceRange baseRange,
61
61
ComponentIdentTypeRepr *ref) = 0;
62
62
63
- // / Resolve a reference to an associated type within the 'Self' type
63
+ // / Resolve an unqualified reference to an associated type of the 'Self' type
64
64
// / of a protocol.
65
65
// /
66
66
// / \param selfTy The base of the member access.
@@ -69,21 +69,15 @@ class GenericTypeResolver {
69
69
// / \returns A type that refers to the dependent member type, or an error
70
70
// / type if such a reference is ill-formed.
71
71
virtual Type resolveSelfAssociatedType (Type selfTy,
72
- DeclContext *DC,
73
72
AssociatedTypeDecl *assocType) = 0;
74
73
75
- // / Retrieve the type when referring to the given context.
74
+ // / Resolve the self type within the given context.
76
75
// /
77
76
// / \param dc A context in which type checking occurs, which must be a type
78
77
// / context (i.e., nominal type or extension thereof).
79
78
// /
80
- // / \param wantSelf Do we want the type of the context itself (the
81
- // / existential type, for protocols) or the type of 'self' inside the
82
- // / context (the 'Self' generic parameter, for protocols). Has no effect
83
- // / for concrete types.
84
- // /
85
79
// / \returns the type of context.
86
- virtual Type resolveTypeOfContext (DeclContext *dc, bool wantSelf= false ) = 0;
80
+ virtual Type resolveTypeOfContext (DeclContext *dc) = 0;
87
81
88
82
// / Retrieve the type when referring to the given type declaration within
89
83
// / its context.
@@ -116,10 +110,9 @@ class DependentGenericTypeResolver : public GenericTypeResolver {
116
110
ComponentIdentTypeRepr *ref);
117
111
118
112
virtual Type resolveSelfAssociatedType (Type selfTy,
119
- DeclContext *DC,
120
113
AssociatedTypeDecl *assocType);
121
114
122
- virtual Type resolveTypeOfContext (DeclContext *dc, bool wantSelf= false );
115
+ virtual Type resolveTypeOfContext (DeclContext *dc);
123
116
124
117
virtual Type resolveTypeOfDecl (TypeDecl *decl);
125
118
@@ -149,10 +142,9 @@ class GenericTypeToArchetypeResolver : public GenericTypeResolver {
149
142
ComponentIdentTypeRepr *ref);
150
143
151
144
virtual Type resolveSelfAssociatedType (Type selfTy,
152
- DeclContext *DC,
153
145
AssociatedTypeDecl *assocType);
154
146
155
- virtual Type resolveTypeOfContext (DeclContext *dc, bool wantSelf= false );
147
+ virtual Type resolveTypeOfContext (DeclContext *dc);
156
148
157
149
virtual Type resolveTypeOfDecl (TypeDecl *decl);
158
150
@@ -182,10 +174,9 @@ class CompleteGenericTypeResolver : public GenericTypeResolver {
182
174
ComponentIdentTypeRepr *ref);
183
175
184
176
virtual Type resolveSelfAssociatedType (Type selfTy,
185
- DeclContext *DC,
186
177
AssociatedTypeDecl *assocType);
187
178
188
- virtual Type resolveTypeOfContext (DeclContext *dc, bool wantSelf= false );
179
+ virtual Type resolveTypeOfContext (DeclContext *dc);
189
180
190
181
virtual Type resolveTypeOfDecl (TypeDecl *decl);
191
182
0 commit comments