This problem only occurs when `asEP_DISALLOW_VALUE_ASSIGN_FOR_REF_TYPE` is enabled.
engine->SetEngineProperty(asEP_DISALLOW_VALUE_ASSIGN_FOR_REF_TYPE, 1);
First of all, set as above.
void main()
{
dictionary d2 = {{'a', dictionary = {{'aa', 1}, {'ab', 2}}},
{'b', dictionary = {{'ba', 1}, {'bb', 2}}}};
auto d2a = cast<dictionary>(d2['a']);
print("d2a.getSize:" + d2a.getSize() + "\n");
}
Next, when you execute the above, the result is as follows.
>asrun.exe script2.as
d2a.getSize:0