Skip to content

Commit

Permalink
Fix test attribute bug (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcauberer authored Aug 11, 2024
1 parent efab32f commit ba631cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typechecker/TypeCheckerPrepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ std::any TypeChecker::visitFctDefPrepare(FctDefNode *node) {
const std::string &stringValue = resourceManager.compileTimeStringValues.at(value->stringValueOffset);
firstManifestation->predefinedMangledName = stringValue;
}
if (const CompileTimeValue *value = attrLst->getAttrValueByName(ATTR_TEST); value->boolValue) {
if (const CompileTimeValue *value = attrLst->getAttrValueByName(ATTR_TEST); value && value->boolValue) {
// Make sure that the function has the correct signature
if (node->hasParams)
throw SemanticError(node->paramLst(), TEST_FUNCTION_WITH_PARAMS, "Test function may not have parameters");
Expand Down

0 comments on commit ba631cc

Please sign in to comment.