Skip to content

Commit ae1e5b1

Browse files
committed
AST: Remove unused TypeBase::isAssignableType()
1 parent 003a9a4 commit ae1e5b1

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

include/swift/AST/Types.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -651,11 +651,6 @@ class alignas(1 << TypeAlignInBits) TypeBase {
651651
return getRecursiveProperties().hasDependentMember();
652652
}
653653

654-
/// Check if this type is a valid type for the LHS of an assignment.
655-
/// This mainly means hasLValueType(), but empty tuples and tuples of empty
656-
/// tuples also qualify.
657-
bool isAssignableType();
658-
659654
/// isExistentialType - Determines whether this type is an existential type,
660655
/// whose real (runtime) type is unknown but which is known to conform to
661656
/// some set of protocols. Protocol and protocol-conformance types are

lib/AST/Type.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -543,19 +543,6 @@ bool TypeBase::isBool() {
543543
return false;
544544
}
545545

546-
547-
bool TypeBase::isAssignableType() {
548-
if (hasLValueType()) return true;
549-
if (auto tuple = getAs<TupleType>()) {
550-
for (auto eltType : tuple->getElementTypes()) {
551-
if (!eltType->isAssignableType())
552-
return false;
553-
}
554-
return true;
555-
}
556-
return false;
557-
}
558-
559546
Type TypeBase::getRValueType() {
560547
// If the type is not an lvalue, this is a no-op.
561548
if (!hasLValueType())

0 commit comments

Comments
 (0)