"a" is not polymorphic

hi, i generated my own class~~>sockewtManager. but there is an “”sockewtManager" is not polymorphic" error. i think it’s related with getInstance method. help me~
inline js_type_class_t js_get_type_from_native {
js_type_class_t
typeProxy;
long typeId = cocos2d::getHashCodeByString.name);
HASH_FIND_INT;
if {
cocos2d::TypeInfo *typeInfo = dynamic_cast<cocos2d::TypeInfo *>;//“a” is not polymorphic
if {
typeId = typeInfo~~>getClassTypeInfo();
} else {
typeId = cocos2d::getHashCodeByString(typeid(T).name());
}
HASH_FIND_INT(_js_global_type_ht, &typeId, typeProxy);
}
return typeProxy;
}

Did your sockewtManager class have a virtual destructor? If not, try to add it and regenerate js bindings glue codes.