Allow ID for StructA/UnionA

This commit is contained in:
Michael Davidsaver
2020-06-25 11:15:12 -07:00
parent 783c53b4d0
commit 5e05249b7d
+1 -1
View File
@@ -124,7 +124,7 @@ const char* TypeCode::name() const
void Member::Helper::node_validate(const Member* parent, const std::string& id, TypeCode code)
{
if(!id.empty() && code!=TypeCode::Struct && code!=TypeCode::Union)
if(!id.empty() && code.scalarOf()!=TypeCode::Struct && code.scalarOf()!=TypeCode::Union)
throw std::logic_error("Only Struct or Union may have an ID");
if(parent) {
auto c = parent->code.scalarOf();