File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,9 @@ class GenericSignature {
195
195
196
196
// / Retrieve the requirements.
197
197
ArrayRef<Requirement> getRequirements () const ;
198
+
199
+ // / Whether this generic signature involves a type variable.
200
+ bool hasTypeVariable () const ;
198
201
};
199
202
200
203
// / A reference to a canonical generic signature.
@@ -424,9 +427,6 @@ class alignas(1 << TypeAlignInBits) GenericSignatureImpl final
424
427
// / generic parameter types by their sugared form.
425
428
Type getSugaredType (Type type) const ;
426
429
427
- // / Whether this generic signature involves a type variable.
428
- bool hasTypeVariable () const ;
429
-
430
430
static void Profile (llvm::FoldingSetNodeID &ID,
431
431
TypeArrayView<GenericTypeParamType> genericParams,
432
432
ArrayRef<Requirement> requirements);
Original file line number Diff line number Diff line change @@ -1775,8 +1775,8 @@ static AllocationArena getArena(GenericSignature genericSig) {
1775
1775
if (!genericSig)
1776
1776
return AllocationArena::Permanent;
1777
1777
1778
- if (genericSig-> hasTypeVariable ()) {
1779
- assert (false && " What's going on " );
1778
+ if (genericSig. hasTypeVariable ()) {
1779
+ assert (false && " Unsubstituted type variable leaked into generic signature " );
1780
1780
return AllocationArena::ConstraintSolver;
1781
1781
}
1782
1782
Original file line number Diff line number Diff line change @@ -1272,7 +1272,7 @@ unsigned GenericSignatureImpl::getGenericParamOrdinal(
1272
1272
return GenericParamKey (param).findIndexIn (getGenericParams ());
1273
1273
}
1274
1274
1275
- bool GenericSignatureImpl ::hasTypeVariable () const {
1275
+ bool GenericSignature ::hasTypeVariable () const {
1276
1276
return GenericSignature::hasTypeVariable (getRequirements ());
1277
1277
}
1278
1278
You can’t perform that action at this time.
0 commit comments