Skip to content

Commit a76012d

Browse files
committed
Sema: Tiny cleanup for createImplicitConstructor()
1 parent a6f6dc0 commit a76012d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/Sema/CodeSynthesis.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,7 @@ createModifyCoroutinePrototype(AbstractStorageDecl *storage,
427427
}
428428

429429
/// Build an expression that evaluates the specified parameter list as a tuple
430-
/// or paren expr, suitable for use in an applyexpr.
431-
///
432-
/// NOTE: This returns null if a varargs parameter exists in the list, as it
433-
/// cannot be forwarded correctly yet.
434-
///
430+
/// or paren expr, suitable for use in an apply expr.
435431
static Expr *buildArgumentForwardingExpr(ArrayRef<ParamDecl*> params,
436432
ASTContext &ctx) {
437433
SmallVector<Identifier, 4> labels;
@@ -2209,7 +2205,7 @@ ConstructorDecl *swift::createImplicitConstructor(TypeChecker &tc,
22092205
// "computed" in the current AST state.
22102206
if (var->isImplicit() || var->isStatic())
22112207
continue;
2212-
tc.validateDecl(var);
2208+
22132209
if (!var->hasStorage() && !var->getAttrs().hasAttribute<LazyAttr>())
22142210
continue;
22152211

@@ -2221,6 +2217,7 @@ ConstructorDecl *swift::createImplicitConstructor(TypeChecker &tc,
22212217

22222218
accessLevel = std::min(accessLevel, var->getFormalAccess());
22232219

2220+
tc.validateDecl(var);
22242221
auto varInterfaceType = var->getValueInterfaceType();
22252222

22262223
// If var is a lazy property, its value is provided for the underlying
@@ -2528,7 +2525,6 @@ swift::createDesignatedInitOverride(TypeChecker &tc,
25282525
auto paramTy = decl->getInterfaceType();
25292526
auto substTy = paramTy.subst(subMap);
25302527
decl->setInterfaceType(substTy);
2531-
decl->setType(GenericEnvironment::mapTypeIntoContext(genericEnv, substTy));
25322528
}
25332529

25342530
// Create the initializer declaration, inheriting the name,

0 commit comments

Comments
 (0)