A state's field default reading a registry (jn_life_sp: []int = jn_life_species_new(), which reads
Species[sp].population) ran before the registry was filled, because globals were initialized in
declaration order: every gate scenario crashed in L_init_globals. Each global's initializer is now
followed - through the functions it calls and a record's field defaults - to the globals it reads,
and those are initialized first (a depth-first post-order; the source order kept between globals
that need nothing of each other, and in a cycle). Putting every state last is not enough: some
tables read a state's instance too. A test (a state whose default reads a registry declared after
it) crashes on
|
||
|---|---|---|
| .. | ||
| backend | ||
| check | ||
| frontend | ||
| golden | ||
| support | ||
| tests | ||
| ludicc.seed.ll | ||
| ludicc.win.seed.ll | ||
| main.ludic | ||