SIL: Tweak SIL verifier condition for witness_method conformance

- Existential type cannot appear here at all, don't handle it explicitly
- Archetypes can have concrete conformances via their superclass
This commit is contained in:
Slava Pestov
2018-04-04 23:57:35 -07:00
parent 2cedf1c86a
commit 0d1a0a694a

View File

@@ -2396,10 +2396,7 @@ public:
require(AMI->getTypeDependentOperands().empty(),
"Should not have an operand for the opened existential");
}
if (isa<ArchetypeType>(lookupType) || lookupType->isAnyExistentialType()) {
require(AMI->getConformance().isAbstract(),
"archetype or existential lookup should have abstract conformance");
} else {
if (!isa<ArchetypeType>(lookupType)) {
require(AMI->getConformance().isConcrete(),
"concrete type lookup requires concrete conformance");
auto conformance = AMI->getConformance().getConcrete();