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 {
195195
196196 // / Retrieve the requirements.
197197 ArrayRef<Requirement> getRequirements () const ;
198+
199+ // / Whether this generic signature involves a type variable.
200+ bool hasTypeVariable () const ;
198201};
199202
200203// / A reference to a canonical generic signature.
@@ -424,9 +427,6 @@ class alignas(1 << TypeAlignInBits) GenericSignatureImpl final
424427 // / generic parameter types by their sugared form.
425428 Type getSugaredType (Type type) const ;
426429
427- // / Whether this generic signature involves a type variable.
428- bool hasTypeVariable () const ;
429-
430430 static void Profile (llvm::FoldingSetNodeID &ID,
431431 TypeArrayView<GenericTypeParamType> genericParams,
432432 ArrayRef<Requirement> requirements);
Original file line number Diff line number Diff line change @@ -1775,8 +1775,8 @@ static AllocationArena getArena(GenericSignature genericSig) {
17751775 if (!genericSig)
17761776 return AllocationArena::Permanent;
17771777
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 " );
17801780 return AllocationArena::ConstraintSolver;
17811781 }
17821782
Original file line number Diff line number Diff line change @@ -1272,7 +1272,7 @@ unsigned GenericSignatureImpl::getGenericParamOrdinal(
12721272 return GenericParamKey (param).findIndexIn (getGenericParams ());
12731273}
12741274
1275- bool GenericSignatureImpl ::hasTypeVariable () const {
1275+ bool GenericSignature ::hasTypeVariable () const {
12761276 return GenericSignature::hasTypeVariable (getRequirements ());
12771277}
12781278
You can’t perform that action at this time.
0 commit comments