File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -170,9 +170,13 @@ class SubstitutionMap {
170170 bool hasArchetypes () const ;
171171
172172 // / Query whether any replacement types in the map contain an opened
173- // / existential.
173+ // / existential or opened element .
174174 bool hasLocalArchetypes () const ;
175175
176+ // / Query whether any replacement types in the map contain an opaque
177+ // / return type.
178+ bool hasOpaqueArchetypes () const ;
179+
176180 // / Query whether any replacement types in the map contain dynamic Self.
177181 bool hasDynamicSelf () const ;
178182
Original file line number Diff line number Diff line change @@ -140,6 +140,14 @@ bool SubstitutionMap::hasLocalArchetypes() const {
140140 return false ;
141141}
142142
143+ bool SubstitutionMap::hasOpaqueArchetypes () const {
144+ for (Type replacementTy : getReplacementTypesBuffer ()) {
145+ if (replacementTy && replacementTy->hasOpaqueArchetype ())
146+ return true ;
147+ }
148+ return false ;
149+ }
150+
143151bool SubstitutionMap::hasDynamicSelf () const {
144152 for (Type replacementTy : getReplacementTypesBuffer ()) {
145153 if (replacementTy && replacementTy->hasDynamicSelfType ())
You can’t perform that action at this time.
0 commit comments