Fix enum parent type not being set

This commit is contained in:
Jan 2021-02-20 10:45:44 +01:00
parent 44e739ba44
commit 989bc9fc30

View File

@ -43,6 +43,8 @@ void SequenceEnum::ProcessMatch(HeaderParserState* state, SequenceResult<HeaderP
if (foundTypeDefinition->GetType() != DataDefinitionType::BASE_TYPE)
throw ParsingException(typeNameToken.GetPos(), "Enums can only have base types as parent type");
parentType = dynamic_cast<const BaseTypeDefinition*>(foundTypeDefinition);
}
state->PushBlock(std::make_unique<HeaderBlockEnum>(name, parentType, isTypedef));