This is a problem when property declarations want to insert other property declarations. The correct place to do this is in validate (as that is the last function which gets called before the property is inserted). However, this function accepts a reference to the Ex, and inject_property takes a shared pointer. Right now Indices gets around this by adding the Integer property in the parse function, but that is risky because in principle the validate could fail, and then the Integer property is inserted but the Indices is not. This needs to be cleaned up, unified and documented.
This is a problem when property declarations want to insert other property declarations. The correct place to do this is in
validate(as that is the last function which gets called before the property is inserted). However, this function accepts a reference to theEx, andinject_propertytakes a shared pointer. Right nowIndicesgets around this by adding theIntegerproperty in theparsefunction, but that is risky because in principle thevalidatecould fail, and then theIntegerproperty is inserted but theIndicesis not. This needs to be cleaned up, unified and documented.