This is the final refactoring for extracting the bultin object
logic out of Interpreterbase. I decided to do both arrays and
dicts in one go since splitting it would have been a lot more
confusing.
D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082
Initially produced using:
for d in "test cases/failing/"* ; do rm -r _build ; ./meson.py setup "$d" _build | grep ERROR >"$d"/expected_stdout.txt; done
then converted to json with jq using:
jq --raw-input --slurp 'split("\n") | {stdout: map({line: select(. != "")})}' expected_stdout.txt >test.json
or merged with existing json using:
jq --slurp '.[0] + .[1]' test.json expected.json >test.json.new
v2:
Add some comments to explain the match when it isn't totally obvious
v3:
Add or adjust existing re: in expected output to handle '/' or '\' path
separators appearing in message, not location.
v4:
Put expected stdout in test.json, rather than a separate expected_stdout.txt file
Park comments in an unused 'comments' key, as JSON doesn't have a syntax for comments
Addition (+), subtraction (-), multiplication (*) and division (/) for numbers
follows the BIDMAS rules.
Strings and arrays can be concatenated with the addition operator
Strings can be concatenated with numbers with the addition operator