@@ -2295,36 +2295,6 @@ TypeExpr *TypeExpr::createForSpecializedDecl(DeclRefTypeRepr *ParentTR,
2295
2295
specializedTR->setValue (boundDecl, ParentTR->getDeclContext ());
2296
2296
} else {
2297
2297
auto *const qualIdentTR = cast<QualifiedIdentTypeRepr>(ParentTR);
2298
- if (isa<TypeAliasDecl>(boundDecl)) {
2299
- // If any of our parent types are unbound, bail out and let
2300
- // the constraint solver can infer generic parameters for them.
2301
- //
2302
- // This is because a type like GenericClass.GenericAlias<Int>
2303
- // cannot be represented directly.
2304
- //
2305
- // This also means that [GenericClass.GenericAlias<Int>]()
2306
- // won't parse correctly, whereas if we fully specialize
2307
- // GenericClass, it does.
2308
- //
2309
- // FIXME: Once we can model generic typealiases properly, rip
2310
- // this out.
2311
- QualifiedIdentTypeRepr *currTR = qualIdentTR;
2312
- while (auto *declRefBaseTR =
2313
- dyn_cast<DeclRefTypeRepr>(currTR->getBase ())) {
2314
- if (!declRefBaseTR->hasGenericArgList ()) {
2315
- auto *decl =
2316
- dyn_cast_or_null<GenericTypeDecl>(declRefBaseTR->getBoundDecl ());
2317
- if (decl && decl->isGeneric ())
2318
- return nullptr ;
2319
- }
2320
-
2321
- currTR = dyn_cast<QualifiedIdentTypeRepr>(declRefBaseTR);
2322
- if (!currTR) {
2323
- break ;
2324
- }
2325
- }
2326
- }
2327
-
2328
2298
specializedTR = QualifiedIdentTypeRepr::create (
2329
2299
C, qualIdentTR->getBase (), ParentTR->getNameLoc (),
2330
2300
ParentTR->getNameRef (), Args, AngleLocs);
0 commit comments