Pin the array/cell boundary the container icon turns on - #12
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 verifyclean, 3940 tests pass.