mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Remove implicit conversion from Witness to ConcreteDeclRef
This commit is contained in:
@@ -150,13 +150,6 @@ public:
|
||||
/// Determines whether there is a witness at all.
|
||||
explicit operator bool() const { return !storage.isNull(); }
|
||||
|
||||
/// Implicit conversion to the \c ConcreteDeclRef, which is used by a
|
||||
/// number of clients.
|
||||
///
|
||||
/// FIXME: We probably want this to go away eventually, because clients using
|
||||
/// it will all need to be cognizant of the synthetic environment.
|
||||
operator ConcreteDeclRef() const { return getDeclRef(); }
|
||||
|
||||
/// Determine whether this witness requires any substitutions.
|
||||
bool requiresSubstitution() const { return storage.is<StoredWitness *>(); }
|
||||
|
||||
|
||||
@@ -1131,7 +1131,7 @@ ConformanceLookupTable::getSatisfiedProtocolRequirementsForMember(
|
||||
|
||||
auto normal = conf->getRootNormalConformance();
|
||||
normal->forEachValueWitness(resolver, [&](ValueDecl *req,
|
||||
ConcreteDeclRef witness) {
|
||||
Witness witness) {
|
||||
if (witness.getDecl() == member)
|
||||
reqs.push_back(req);
|
||||
});
|
||||
|
||||
@@ -1642,7 +1642,7 @@ void Serializer::writeDefaultWitnessTable(const ProtocolDecl *proto,
|
||||
unsigned abbrCode = abbrCodes[DefaultWitnessTableLayout::Code];
|
||||
for (auto member : proto->getMembers()) {
|
||||
if (auto *value = dyn_cast<ValueDecl>(member)) {
|
||||
ConcreteDeclRef witness = proto->getDefaultWitness(value);
|
||||
auto witness = proto->getDefaultWitness(value);
|
||||
if (!witness)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user