You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
### Added
11
11
12
12
-**Null-coalesce (`??`) type refinement.** When the left-hand side of `??` is provably non-nullable (e.g. `new Foo()`, `clone $x`, a literal), the right-hand side is recognized as dead code and the result resolves to the LHS type only. When the LHS is nullable (e.g. a `?Foo` return type), `null` is stripped from the LHS and the result is the union of the non-null LHS with the RHS.
13
+
-**`@mixin` generic substitution.** When a class declares `@mixin Builder<TRelatedModel>`, the generic arguments are now preserved and substituted into the mixin's members. Previously, `@mixin Builder<TRelatedModel>` was stored as just `Builder` (the generic argument was stripped), so methods like `firstOrFail(): TModel` returned the raw template parameter name instead of the concrete type. This resolves through inheritance chains: `BelongsTo @extends Relation<Product>` with `Relation @mixin Builder<TRelatedModel>` now correctly substitutes `TModel` to `Product` on all Builder methods.
13
14
14
15
### Fixed
15
16
17
+
-**Hover and completion type parity.** The hover type-string engine now handles pipe expressions (`|>`), closure/arrow-function literals, and generator yield-assignment (`$var = yield`) expressions, matching the completion engine. Previously these expression kinds were only handled by the completion pipeline, so hover could show a different (or missing) type for variables assigned from them.
18
+
16
19
-**Guard clause narrowing across instanceof branches.** After `if ($x instanceof Y) { return; }`, subsequent `instanceof` checks on the same variable no longer incorrectly resolve to `Y`. Previously the diagnostic cache reused the narrowed type from inside the first branch for all later accesses to the same variable, producing false-positive "not found" warnings (e.g. "Property 'value' not found on class 'Stringable'" inside a `BackedEnum` branch).
17
20
-**`instanceof self/static/parent` narrowing.** Type narrowing with `instanceof self`, `instanceof static`, and `instanceof parent` now works correctly in all contexts (assert, if-blocks, guard clauses, compound conditions). Previously these keywords were ignored because the AST parser produces dedicated node types rather than identifiers, and `parent` was not recognized as a type hint during resolution.
18
21
-**Interface constants through multi-extends chains.** Constants defined on parent interfaces are now found when an interface extends multiple other interfaces. Previously only the first parent interface was walked for member merging, so constants like `Carbon::JANUARY` (defined on the `UnitValue` interface, sixth in `CarbonInterface`'s extends list) were reported as unknown.
0 commit comments