Fix struct interaction with type system

This commit is contained in:
2026-04-09 17:13:51 +10:00
parent f694f50d70
commit 9b55b509f5

View File

@@ -1025,6 +1025,9 @@ ResultType(GroundProgram, charptr) generateStructNode(SolsNode* node, SolsScope*
}
groundAddInstructionToProgram(&structDef, groundCreateInstruction(ENDSTRUCT));
// Add to scope
addVariableToScope(scope, node->as.idName, type);
// Combine into one program
for (size_t i = 0; i < structDef.size; i++) {
groundAddInstructionToProgram(&constants, structDef.instructions[i]);