mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Introduce ProtocolConformanceRef::forAbstract()
This commit is contained in:
@@ -33,16 +33,10 @@
|
||||
|
||||
using namespace swift;
|
||||
|
||||
ProtocolConformanceRef::ProtocolConformanceRef(ProtocolDecl *protocol,
|
||||
ProtocolConformance *conf) {
|
||||
assert(protocol != nullptr &&
|
||||
"cannot construct ProtocolConformanceRef with null protocol");
|
||||
if (conf) {
|
||||
assert(protocol == conf->getProtocol() && "protocol conformance mismatch");
|
||||
Union = conf;
|
||||
} else {
|
||||
Union = protocol;
|
||||
}
|
||||
ProtocolConformanceRef ProtocolConformanceRef::forAbstract(
|
||||
Type subjectType, ProtocolDecl *proto) {
|
||||
// Temporary implementation:
|
||||
return ProtocolConformanceRef(proto);
|
||||
}
|
||||
|
||||
bool ProtocolConformanceRef::isInvalid() const {
|
||||
|
||||
Reference in New Issue
Block a user