CNA-BUG-216: MathTypeConverter::supportStringConvert's comment names three converters that clear it; six do
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
The Doxygen comment says only the BoundingBox, BoundingSphere and Ray converters clear supportStringConvert and that the matrix and rectangle converters leave it set; the Rectangle, Matrix, BoundingBox, BoundingSphere, Plane and Ray converters all clear it.
- Identifier
CNA-BUG-216- Category
- Bug
- Subsystem
- Documentation & release tooling
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Severity
- Low (a triage suggestion, not a project priority)
- Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- The protected field Microsoft::Xna::Framework::Design::MathTypeConverter::supportStringConvert as documented in MathTypeConverter.hpp
Expected behaviour
CNA's design note docs/framework-design.md and the tests agree: Rectangle, Matrix, BoundingBox, BoundingSphere, Plane and Ray reject string input (they still convert to a string through ToString()), while Point, Color, Quaternion and Vector2/3/4 parse component lists.
Actual behaviour at TARGET
The comment in MathTypeConverter.hpp says "BoundingBox, BoundingSphere and Ray clear it, because those three have no string form; the vector, matrix, colour, point and rectangle converters leave it set". In Converters.cpp the constructors of RectangleConverter, MatrixConverter, BoundingBoxConverter, BoundingSphereConverter, PlaneConverter and RayConverter all set supportStringConvert = false. A subclass author reading the header would misjudge which built-in converters parse strings.
Source locations
modules/design/include/Microsoft/Xna/Framework/Design/MathTypeConverter.hpp— the supportStringConvert commentmodules/design/src/Converters.cpp— the six converter constructors that clear the flagmodules/design/tests/Microsoft/Xna/Framework/Design/FrameworkDesignTests.cpp— expectStringInputDisabled for the six typesdocs/framework-design.md— states the six-type rule correctly
Evidence
Checked by reading at 009d40f5; nothing was built or executed for this entry. The comment was compared with the six constructor bodies and with the tests that assert string input is disabled for exactly those six types.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
expectStringInputDisabled in FrameworkDesignTests.cpp is applied to Rectangle, Matrix, BoundingBox, BoundingSphere, Plane and Ray, pinning the behaviour; nothing checks the comment.
Regression test
A documentation fix naming the six types; the existing tests already pin them.
Blast radius
Documentation only: authors of MathTypeConverter subclasses and readers of the generated API documentation. Conversion behaviour is unaffected.
Workaround
Follow docs/framework-design.md or the design-converter guide, which list the six types correctly.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Known issues
- Bug index