Push get/setInterfaceType() up to ValueDecl.

No functionality change here.


Swift SVN r9552
This commit is contained in:
Doug Gregor
2013-10-21 19:05:02 +00:00
parent 63c264446d
commit cd0299f85a
5 changed files with 44 additions and 36 deletions

View File

@@ -749,10 +749,8 @@ static Optional<swift::Associativity> getActualAssociativity(uint8_t assoc) {
/// Retrieve the interface type for the given declaration.
static Type getValueInterfaceType(ValueDecl *value) {
if (auto func = dyn_cast<AbstractFunctionDecl>(value)) {
if (auto interfaceTy = func->getInterfaceType())
return interfaceTy;
}
if (auto interfaceTy = value->getInterfaceType())
return interfaceTy;
return value->getType();
}