var.opIndexAssign
void opIndexAssign(T)(T rhs, string key) @safeAssign a value to a child by key (map-style assignment).
This ensures the current value is a map (converting from Type.NULL on first use), then assigns rhs to the entry under key.
void opIndexAssign(T)(T rhs, size_t index) @safeAssign a value to an array element by index.
Without this overload, the compiler commits to the map-style opIndexAssign rewrite and a[0] = value fails to compile for arrays, even though a ref-returning opIndex(size_t) exists.
Preconditions:
- The current value must be
Type.ARRAY(orNULLin coercion mode). indexmust be in range[0 .. length), otherwise aVarIndexExceptionis thrown.