Skip to content

Commit

Permalink
fix: type-checking for foreach loops in trait methods (#1017)
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-trunov authored Nov 6, 2024
1 parent 14b7c89 commit 85416ae
Show file tree
Hide file tree
Showing 5 changed files with 899 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Docs: correctly handle next and previous page links at the bottom of the pages when there's a separator item in the sidebar: PR [#949](https://github.com/tact-lang/tact/pull/949)
- Docs: compilation of examples in `data-structures.mdx` and across Cookbook: PR [#917](https://github.com/tact-lang/tact/pull/917)
- `as coins` map value serialization type is now handled correctly: PR [#987](https://github.com/tact-lang/tact/pull/987)
- Type checking for `foreach` loops in trait methods: PR [#1017](https://github.com/tact-lang/tact/pull/1017)

### Release contributors

Expand Down
1 change: 1 addition & 0 deletions src/grammar/clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export function cloneNode<T extends AstNode>(src: T): T {
} else if (src.kind === "statement_foreach") {
return cloneAstNode({
...src,
map: cloneNode(src.map),
statements: src.statements.map(cloneNode),
});
} else if (src.kind === "function_def") {
Expand Down
Loading

0 comments on commit 85416ae

Please sign in to comment.