mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Remodel the Interface for Implicit TypeExprs
Make it slightly easier to enforce the invariant that implicit TypeExpr nodes have a contextual type set.
This commit is contained in:
@@ -42,8 +42,9 @@ deriveBodyBridgedNSError_enum_nsErrorDomain(AbstractFunctionDecl *domainDecl,
|
||||
auto self = domainDecl->getImplicitSelfDecl();
|
||||
|
||||
auto selfRef = new (C) DeclRefExpr(self, DeclNameLoc(), /*implicit*/ true);
|
||||
auto stringType = TypeExpr::createForDecl(DeclNameLoc(), C.getStringDecl(),
|
||||
domainDecl, /*implicit*/ true);
|
||||
auto stringType = TypeExpr::createImplicitForDecl(
|
||||
DeclNameLoc(), C.getStringDecl(), domainDecl,
|
||||
C.getStringDecl()->getInterfaceType());
|
||||
auto initReflectingCall =
|
||||
CallExpr::createImplicit(C, stringType,
|
||||
{ selfRef }, { C.getIdentifier("reflecting") });
|
||||
|
||||
Reference in New Issue
Block a user