don't report invalid derivations

This commit is contained in:
David Rose 2001-06-06 15:14:46 +00:00
parent 7782d86901
commit 21ff872027

View File

@ -2040,6 +2040,10 @@ define_struct_type(InterrogateType &itype, CPPStructType *cpptype,
CPPType *base_type = TypeManager::resolve_type(base._base, scope);
TypeIndex base_index = get_type(base_type, true);
if (base_index == 0) {
nout << *cpptype << " reports a derivation from an invalid type.\n";
} else {
InterrogateType::Derivation d;
d._flags = 0;
d._base = base_index;
@ -2083,6 +2087,7 @@ define_struct_type(InterrogateType &itype, CPPStructType *cpptype,
itype._derivations.push_back(d);
}
}
}
CPPScope::Declarations::const_iterator di;
for (di = scope->_declarations.begin();