Skip to content

Commit 1534b36

Browse files
committed
[NFC] Const-qualify SelectedOverload's members
1 parent 84ff97a commit 1534b36

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/Sema/CSApply.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4485,7 +4485,8 @@ namespace {
44854485
}
44864486

44874487
void buildKeyPathSubscriptComponent(
4488-
SelectedOverload &overload, SourceLoc componentLoc, Expr *indexExpr,
4488+
const SelectedOverload &overload,
4489+
SourceLoc componentLoc, Expr *indexExpr,
44894490
ArrayRef<Identifier> labels, ConstraintLocator *locator,
44904491
SmallVectorImpl<KeyPathExpr::Component> &components) {
44914492
auto subscript = cast<SubscriptDecl>(overload.choice.getDecl());

lib/Sema/ConstraintSystem.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,19 +471,19 @@ enum class SolutionCompareResult {
471471
/// declaration was opened, which may involve type variables.
472472
struct SelectedOverload {
473473
/// The overload choice.
474-
OverloadChoice choice;
474+
const OverloadChoice choice;
475475

476476
/// The opened type of the base of the reference to this overload, if
477477
/// we're referencing a member.
478-
Type openedFullType;
478+
const Type openedFullType;
479479

480480
/// The opened type produced by referring to this overload.
481-
Type openedType;
481+
const Type openedType;
482482

483483
/// The type that this overload binds. Note that this may differ from
484484
/// openedType, for example it will include any IUO unwrapping that has taken
485485
/// place.
486-
Type boundType;
486+
const Type boundType;
487487
};
488488

489489
/// Provides information about the application of a function argument to a

0 commit comments

Comments
 (0)