mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user