Use ValueDecl::isDynamic() instead of getAttrs().hasAttribute<DynamicAttr>()

This commit is contained in:
Slava Pestov
2017-03-29 00:14:45 -07:00
parent 96db387ad3
commit 53759f7126
9 changed files with 35 additions and 36 deletions

View File

@@ -3164,7 +3164,7 @@ getWitnessDispatchKind(Type selfType, SILDeclRef witness, bool isFree) {
auto *decl = witness.getDecl();
// If the witness is dynamic, go through dynamic dispatch.
if (decl->getAttrs().hasAttribute<DynamicAttr>())
if (decl->isDynamic())
return WitnessDispatchKind::Dynamic;
bool isFinal = (decl->isFinal() || C->isFinal());