Sort attrs from tables in fromTOML

This was dropped in 10a8b5d for the migration from cpptoml to toml11 but
seems to be necessary for the attrsets to work correctly.

Fixes #5833
This commit is contained in:
Lily Foster 2021-12-28 10:10:58 -05:00
parent 0e90b13ab1
commit 92c7d33ee3

View file

@ -31,6 +31,8 @@ static void prim_fromTOML(EvalState & state, const Pos & pos, Value * * args, Va
auto & v2 = *state.allocAttr(v, state.symbols.create(elem.first)); auto & v2 = *state.allocAttr(v, state.symbols.create(elem.first));
visit(v2, elem.second); visit(v2, elem.second);
} }
v.attrs->sort();
} }
break;; break;;
case toml::value_t::array: case toml::value_t::array: