Mago 1.13.3
This is a patch release packed with bug fixes across the analyzer, codex, and formatter. The analyzer fixes address several false positives involving generics, union types, type inference, and unreachable code detection. The codex fixes resolve issues with type combination and @inheritDoc inheritance. The formatter fixes resolve issues with concatenation chain formatting and preserve-break propagation.
🐛 Bug Fixes
Analyzer
- Deduplicated signature compatibility checks in diamond inheritance: Fixed duplicate diagnostics (e.g.,
incompatible-parameter-namereported multiple times) when a class implements multiple interfaces sharing a common ancestor (#1245) - Fixed potentially undefined array element in union types: Fixed incorrect inference when accessing array elements that may be undefined within union types (#1263)
- Fixed empty array inference for bare generic parameter templates: Fixed a bug where generic type information was lost when passing an empty array to a function with a bare generic parameter template (#1264)
- Fixed
statictype resolution in method parameters for final classes: Fixed a false positiveless-specific-argumentwhen using generics that referencestaticin method parameters.staticis now resolved using the method context and treated as exact for final classes (#1265) - Fixed false positive unreachable code for declarations: Fixed a false positive where class, function, and other declarations following an unconditional return or throw were incorrectly reported as unreachable. Declarations are now excluded from unreachable code diagnostics and dead-code filtering (#1259)
Codex
- Fixed literal floats dropped from union types during type combination: Fixed a bug where the type combiner's fast path incorrectly dropped literal float types from unions. For example, a
T|nullparameter whereTwas inferred as a float would collapse to justnull(#1262) - Fixed
@inheritDocoverwriting narrower child return types: Fixed a bug where@inheritDocon a child method would replace the child's more specific native return type with the parent's broader docblock type. The inherited type is now narrowed against the child's native return type when the child is more specific (#1266)
Formatter
- Fixed preserve breaks affecting parent groups: Fixed an idempotency issue where
preserve_breaking_*settings caused structural break propagation to parent groups, leading to different output on subsequent formatting passes. Preserve-sourced breaks are now isolated from structural breaks (#1260) - Fixed concatenation chains staying hugged in argument lists: Fixed a bug where long string concatenation chains (3+ operands) inside constructor or function arguments were incorrectly "hugged" within the parentheses, causing the concatenation operators to break at the statement's indentation level instead of properly expanding the argument list (#1255)
🏗️ Internal
- Applied fixes from nightly Clippy (#1274)
🙏 Thank You
Contributors
A huge thank you to everyone who contributed code to this release:
Issue Reporters
Thank you to everyone who reported issues that shaped this release:
Full Changelog: 1.13.2...1.13.3