@@ -2295,36 +2295,6 @@ TypeExpr *TypeExpr::createForSpecializedDecl(DeclRefTypeRepr *ParentTR,
22952295 specializedTR->setValue (boundDecl, ParentTR->getDeclContext ());
22962296 } else {
22972297 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-
23282298 specializedTR = QualifiedIdentTypeRepr::create (
23292299 C, qualIdentTR->getBase (), ParentTR->getNameLoc (),
23302300 ParentTR->getNameRef (), Args, AngleLocs);
0 commit comments