mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #31253 from CodaFi/casting-call
Strip TypeExpr of its TypeLoc
This commit is contained in:
@@ -93,8 +93,9 @@ deriveBodyMathOperator(AbstractFunctionDecl *funcDecl, MathOperator op) {
|
||||
auto *initDRE =
|
||||
new (C) DeclRefExpr(memberwiseInitDecl, DeclNameLoc(), /*Implicit*/ true);
|
||||
initDRE->setFunctionRefKind(FunctionRefKind::SingleApply);
|
||||
auto *nominalTypeExpr = TypeExpr::createForDecl(DeclNameLoc(), nominal,
|
||||
funcDecl, /*Implicit*/ true);
|
||||
auto *nominalTypeExpr = TypeExpr::createImplicitForDecl(
|
||||
DeclNameLoc(), nominal, funcDecl,
|
||||
funcDecl->mapTypeIntoContext(nominal->getInterfaceType()));
|
||||
auto *initExpr = new (C) ConstructorRefCallExpr(initDRE, nominalTypeExpr);
|
||||
|
||||
// Get operator protocol requirement.
|
||||
@@ -223,8 +224,9 @@ deriveBodyPropertyGetter(AbstractFunctionDecl *funcDecl, ProtocolDecl *proto,
|
||||
new (C) DeclRefExpr(memberwiseInitDecl, DeclNameLoc(), /*Implicit*/ true);
|
||||
initDRE->setFunctionRefKind(FunctionRefKind::SingleApply);
|
||||
|
||||
auto *nominalTypeExpr = TypeExpr::createForDecl(DeclNameLoc(), nominal,
|
||||
funcDecl, /*Implicit*/ true);
|
||||
auto *nominalTypeExpr = TypeExpr::createImplicitForDecl(
|
||||
DeclNameLoc(), nominal, funcDecl,
|
||||
funcDecl->mapTypeIntoContext(nominal->getInterfaceType()));
|
||||
auto *initExpr = new (C) ConstructorRefCallExpr(initDRE, nominalTypeExpr);
|
||||
|
||||
auto createMemberPropertyExpr = [&](VarDecl *member) -> Expr * {
|
||||
|
||||
Reference in New Issue
Block a user