| 28 | } |
| 29 | |
| 30 | void ClassFunctionDeclaration::setAbstractType(AbstractType::Ptr type) |
| 31 | { |
| 32 | ///TODO: write testcase for typealias case which used to trigger this warning: |
| 33 | /// typedef bool (*EventFilter)(void *message, long *result); |
| 34 | /// in e.g. qcoreapplication.h:172 |
| 35 | if (type && !dynamic_cast<FunctionType*>(type.data()) && type->whichType() != AbstractType::TypeAlias) { |
| 36 | qCWarning(LANGUAGE) << "WARNING: Non-function type assigned to function declaration. Type is: " |
| 37 | << type->toString() << "whichType:" << type->whichType() |
| 38 | << "Declaration is:" << toString() |
| 39 | << topContext()->url().str() << range().castToSimpleRange(); |
| 40 | } |
| 41 | ClassMemberDeclaration::setAbstractType(type); |
| 42 | } |
| 43 | |
| 44 | DEFINE_LIST_MEMBER_HASH(ClassFunctionDeclarationData, m_defaultParameters, IndexedString) |
| 45 | |