Skip to content

Commit 90893b9

Browse files
committed
AST: Types are immutable so there's no reason for TypeBase::findUnresolvedDependentMemberType() to return a 'const'
1 parent 210e135 commit 90893b9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/swift/AST/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ class alignas(1 << TypeAlignInBits) TypeBase
696696
///
697697
/// "Unresolved" dependent member types have no known associated type,
698698
/// and are only used transiently in the type checker.
699-
const DependentMemberType *findUnresolvedDependentMemberType();
699+
DependentMemberType *findUnresolvedDependentMemberType();
700700

701701
/// Return the root generic parameter of this type parameter type.
702702
GenericTypeParamType *getRootGenericParam();

lib/AST/Type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4540,10 +4540,10 @@ Type Type::subst(TypeSubstitutionFn substitutions,
45404540
return substType(*this, substitutions, conformances, options);
45414541
}
45424542

4543-
const DependentMemberType *TypeBase::findUnresolvedDependentMemberType() {
4543+
DependentMemberType *TypeBase::findUnresolvedDependentMemberType() {
45444544
if (!hasTypeParameter()) return nullptr;
45454545

4546-
const DependentMemberType *unresolvedDepMemTy = nullptr;
4546+
DependentMemberType *unresolvedDepMemTy = nullptr;
45474547
Type(this).findIf([&](Type type) -> bool {
45484548
if (auto depMemTy = type->getAs<DependentMemberType>()) {
45494549
if (depMemTy->getAssocType() == nullptr) {

0 commit comments

Comments
 (0)