Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions baml_language/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ This changelog covers the independent `baml_language` release line. It does not

### Fixes

- Carried a constructed type's identity through interface dispatch: `type.of<T>()` inside an implements-block or inherited default method is now the exact `type` value the caller minted for a `reflect.class.new` or `reflect.enum.new` declaration, instead of an `==`-distinct re-derivation of the same type. Identity-keyed patterns — a registry keyed by type, a comparison against a stored type — match inside an impl body instead of silently missing. Statically instantiated type parameters, derived types (`t.array()`, `type.meta(…)`), and declarations from a compiled `reflect.Package` keep re-deriving their value, so they are unaffected. ([#4516](https://github.com/BoundaryML/baml/pull/4516)) - Antonio Sarosi
- Carried a runtime-minted type's identity through interface dispatch: `type.of<T>()` inside an implements-block or inherited default method is now the exact `type` value the caller minted, instead of an `==`-distinct re-derivation of the same type. Identity-keyed patterns — a registry keyed by type, a comparison against a stored type — match inside an impl body instead of silently missing. Statically instantiated type parameters and derived types (`t.array()`, `type.meta(…)`) are unaffected. ([#4516](https://github.com/BoundaryML/baml/pull/4516)) - Antonio Sarosi
- Rejected an inline `unreflect(value)` type argument whose runtime type would escape into the expression's published type — `Agent<unreflect(t)>.new(...)`, `Holder<unreflect(t)> { ... }`, any callee returning `Wrapper<T>` or `T[]` — with E0168, which suggests naming it first (`type Out = unreflect(value)`). The class-literal spelling had reached MIR lowering with an error-recovery type argument and panicked. Results typed by the parameter itself (`sap.parse<unreflect(t)>`, `Fn$parse<unreflect(t)>`) and results that never mention it (`Fn$render_prompt<unreflect(t)>`) are unchanged. ([#4518](https://github.com/BoundaryML/baml/pull/4518)) - Antonio Sarosi
- Fixed optional-chained method calls dropping their type arguments: `x?.m<T>()` — along with inferred, class-generic, and interface-dispatched forms — now seeds the callee's type-argument frame exactly like `x.m<T>()` instead of failing at runtime with an internal frame type-arg error. An optional-chained call to a builtin I/O method (`file?.text()`) also takes the same inline sys-op path as the plain spelling, so its omitted defaulted arguments are materialized rather than reaching the engine unset. ([#4495](https://github.com/BoundaryML/baml/pull/4495)) - Antonio Sarosi
- Rejected class-literal construction of the builtin companion carriers (`baml.Int`, `baml.Map`, `baml.String`, and the other zero-field method carriers) with E0166 instead of building a meaningless empty instance; `baml.Map {}` and `baml.Array {}` had reached MIR lowering with unsolved phantom type arguments and panicked. ([#4493](https://github.com/BoundaryML/baml/pull/4493)) - Antonio Sarosi
Expand Down
Loading
Loading