allow TypeDef to append StructA and UnionA

This commit is contained in:
Michael Davidsaver
2022-10-11 09:15:58 -07:00
parent edbcd46a5f
commit 89c02b47db
2 changed files with 37 additions and 3 deletions
+2 -2
View File
@@ -341,8 +341,8 @@ Member TypeDef::as(const std::string& name) const
std::shared_ptr<Member> TypeDef::_append_start()
{
if(!top || (top->code!=TypeCode::Struct && top->code!=TypeCode::Union))
throw std::logic_error("May only append to Struct or Union");
if(!top || (top->code.scalarOf()!=TypeCode::Struct && top->code.scalarOf()!=TypeCode::Union))
throw std::logic_error("May only append to Struct, Union, StructA, or UnionA");
std::shared_ptr<Member> edit;
if(top.use_count()==1u) {