Found bug by recursion

master
Marko Semet 2019-06-22 17:20:09 +02:00
parent 646e3a352b
commit 60083e8864
3 changed files with 9 additions and 3 deletions

View File

@ -158,7 +158,7 @@ namespace sirEdit::data {
TYPE_STATE getTypeTransitiveState(const Type& type) const {
// Is at least read?
if(!this->__hasReadSubtype(type))
return TYPE_STATE::NO;
return TYPE_STATE::UNUSED;
// Get current state
TYPE_STATE result = TYPE_STATE::READ;

View File

@ -63,7 +63,10 @@ src_siredit_test = [
'src/unittests/rules/rule1.cpp',
'src/unittests/rules/rule2.cpp',
'src/unittests/rules/rule3.cpp',
'src/unittests/rules/rule4.cpp'
'src/unittests/rules/rule4.cpp',
'src/unittests/rules/rule5.cpp',
'src/unittests/rules/rule6.cpp',
'src/unittests/rules/rule7.cpp'
]
# Resource encoding

View File

@ -40,7 +40,8 @@ namespace {
Type* super = const_cast<Type*>(getSuper(*(i.second)));
// Add to subtypes list
super->getSubTypes().push_back(i.second);
if(super != nullptr)
super->getSubTypes().push_back(i.second);
}
// TODO: Type inconsistent
@ -86,6 +87,8 @@ namespace {
this->_addType(this->g);
this->_addType(this->h);
this->_addType(this->i);
this->_update();
}
};
}