Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ParserTest: Make sure recursion checking readonly arrays doesn't error
If we assigned a recursion marker to a readonly array we'd get an error since it's supposed to be immutable. However, since we dump object properties by first casting instances to arrays it makes a copy of the array to be checked which _can_ be modified unlike the property itself. Now you may be thinking "Doesn't this cause recursion checking to break for 1 loop when dumping" but it turns out it's impossible to assign references to readonly properties so this bug exists in the users code and our recursion check breaking for 1 loop is actually an accurate representation of what's going on!
- Loading branch information