Skip to content

Pin the array/cell boundary the container icon turns on - #12

Merged
ww-mw merged 1 commit into
mainfrom
container-icon-boundary
Sep 6, 2026
Merged

Pin the array/cell boundary the container icon turns on#12
ww-mw merged 1 commit into
mainfrom
container-icon-boundary

Conversation

@ww-mw

@ww-mw ww-mw commented Sep 6, 2026

Copy link
Copy Markdown
Member

Follow-up guard for #11. A MATLAB array is homogeneous — every element the same type — so the container row and its element rows are rows about the same kind of thing and have to draw as one. A cell is not a missing case of that rule but its own type, whose elements can each be anything, so its container keeps the cell glyph and inherits nothing; there is no element type to inherit from.

Getting the second half wrong is the exact mirror of the object-array bug #11 fixed, and equally invisible to the per-class icon tests: they live in node classes that know nothing of each other (MatlabVariableNode, ObjectNode, StructNode) and each asserts its own literal, so none can catch the rule being applied to the wrong half.

Covers double, logical, struct and object arrays (branded class and unmodelled class) on the uniform side; on the cell side, a heterogeneous cell whose three elements deliberately disagree, plus a cell whose elements all happen to share a type — a cell of three doubles is still a cell.

Verified by mutation: teaching the cell arm to inherit its first element's icon fails both cell cases. npm run verify clean, 3940 tests pass.

A MATLAB array is homogeneous — every element the same type — so the
container row and its element rows are rows about the same kind of thing
and have to draw as one. A cell is not a missing case of that rule but
its own type, whose elements can each be anything, so its container keeps
the cell glyph and inherits nothing; there is no element type to inherit
from. Getting the second half wrong is the exact mirror of the object
array bug just fixed, and equally invisible to the per-class icon tests:
they live in node classes that know nothing of each other and each
asserts its own literal, so none can catch the rule being applied to the
wrong half.

Covers double, logical, struct and object arrays (branded class and
unmodelled class) on the uniform side, and on the cell side a
heterogeneous cell whose three elements deliberately disagree plus a cell
whose elements all happen to share a type — a cell of three doubles is
still a cell. Verified by mutation: teaching the cell arm to inherit its
first element's icon fails both cell cases.
@ww-mw
ww-mw merged commit 6d3ddd0 into main Sep 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant