fix: initialize BaseEmitter in Engine constructor

The Engine struct embeds BaseEmitter but wasn't initializing it,
causing a nil map panic when emitting events. Now properly
initializes the BaseEmitter using emitter.New[Event]().
This commit is contained in:
2026-01-13 19:29:11 -05:00
parent 6b946fb5dc
commit 93cb7ccd78

View File

@@ -17,7 +17,11 @@ type Engine struct {
// Create a new engine, given an unreduced λ-expression. // Create a new engine, given an unreduced λ-expression.
func New(config *config.Config, expression *lambda.Expression) *Engine { func New(config *config.Config, expression *lambda.Expression) *Engine {
return &Engine{Config: config, Expression: expression} return &Engine{
Config: config,
Expression: expression,
BaseEmitter: *emitter.New[Event](),
}
} }
// Begin the reduction process. // Begin the reduction process.