-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bugfix] literals in template strings (#1132)
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Fixes handling of literals in template strings by updating type inference and test cases to correctly identify and evaluate literal values. > > - **Behavior**: > - Update `infer_const_type` in `expr.rs` to return `Type::Literal` for `Bool`, `String`, and `Number` kinds. > - Modify error messages in `test_expr.rs` and `test_stmt.rs` to reflect literal types in function argument errors. > - **Tests**: > - Update `test_ifexpr`, `test_call_function`, and `test_output_format` in `test_expr.rs` to check for `Type::Literal`. > - Update `if_else` in `test_stmt.rs` to handle literal types in conditional expressions. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup> for a2180b3. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
- Loading branch information
1 parent
0b4a9bc
commit b8a221f
Showing
3 changed files
with
49 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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