Bug introduced in 10.2, and persisting through 11.1
Bug resolved in 12.0
This is strange:
ClearAll[x, y, a, b];
a[{{_Integer, _Integer, _Integer | PatternSequence[]} ..}] := c;
(*this is a match:*)
a[{{1, 1}}]
(*this too:*)
a[{{1, 1, 1}}]
b = CoordinateBoundsArray /@ {{{1, 1}, {1, 1}}};
x = First@b;
y = {{{1, 1}}};
x === y(*True*)
a /@ x(*{a[{{1,1}}]}*)(* this does not finish evaluating?!*)
a /@ y(*{c}*)
If[Not[
a /@ x === a /@ y(*False*)
], "something is wrong"]
Everything works fine if I change a
to
a[{{_Integer, _Integer} ..}] := c;
or if assign the result of CoordinateBoundsArray /@ {{{1, 1}, {1, 1}}}
to b
b = {{{{1, 1}}}};
Can someone confirm this?