Skip to content

Commit da90fec

Browse files
committed
Sema: Keep all instance variables together in RequirementMatch
1 parent ea7251b commit da90fec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,10 @@ struct swift::RequirementMatch {
384384
/// The set of optional adjustments performed on the witness.
385385
SmallVector<OptionalAdjustment, 2> OptionalAdjustments;
386386

387+
/// Substitutions mapping the type of the witness to the requirement
388+
/// environment.
389+
SmallVector<Substitution, 2> WitnessSubstitutions;
390+
387391
/// \brief Determine whether this match is viable.
388392
bool isViable() const {
389393
switch(Kind) {
@@ -438,8 +442,6 @@ struct swift::RequirementMatch {
438442
llvm_unreachable("Unhandled MatchKind in switch.");
439443
}
440444

441-
SmallVector<Substitution, 2> WitnessSubstitutions;
442-
443445
swift::Witness getWitness(ASTContext &ctx) const {
444446
SmallVector<Substitution, 2> syntheticSubs;
445447
auto syntheticEnv = ReqEnv->getSyntheticEnvironment();

0 commit comments

Comments
 (0)