Skip to content

Commit 1b91218

Browse files
committedApr 21, 2021
AutoDiff: Don't check hasInterfaceType() in ResolveEffectiveMemberwiseInitRequest::evaluate()
This check made this request depend on evaluation order, sometimes synthesizing a second memberwise initializer if the previous one's interface type had not been computed yet.
1 parent 7839ab6 commit 1b91218

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed
 

‎lib/Sema/CodeSynthesis.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -1312,10 +1312,6 @@ ResolveEffectiveMemberwiseInitRequest::evaluate(Evaluator &evaluator,
13121312
continue;
13131313
storedProperties.push_back(vd);
13141314
}
1315-
// Return false if initializer does not have interface type set. It is not
1316-
// possible to determine whether it is a memberwise initializer.
1317-
if (!initDecl->hasInterfaceType())
1318-
return false;
13191315
auto initDeclType =
13201316
initDecl->getMethodInterfaceType()->getAs<AnyFunctionType>();
13211317
// Return false if initializer does not have a valid interface type.

0 commit comments

Comments
 (0)