[ ] foreach loop for the Map type now works not only with simple identifiers, but with contract storage and struct fields too: foreach (k, v in self.map) {...} or foreach (k, v in struct.map) {...}.
[ ] Trailing semicolons in struct/message declarations are optional now: struct Foo {x: Int} is valid syntax now.
[ ] Trailing semicolon in for the last statement in a block is optional now: { let x: Int = 42 } is valid syntax now.
[ ] Type annotation for let-statements are optional now: let x = 42 is valid syntax now.
stdlib functions
[ ] Fixed the return type of skipBits in stdlib/std/cells.tact: extends mutates native skipBits(self: Slice, l: Int) (used to return Int, now it's void).
[ ] New loadBool method for slices.
[ ] New fromCell and fromSlice methods for struct parsing.
[ ] nativeThrowWhen has been renamed to nativeThrowIf.
The following is the list of IDE-relevant changes for Tact v1.4.0 which has been released. This issue is a follow-up on #177. The full changelog is here: https://github.com/tact-lang/tact/blob/main/CHANGELOG.md#140---2024-06-21.
New or changed syntax
~
.|=
,&=
,^=
.foreach
loop for theMap
type now works not only with simple identifiers, but with contract storage and struct fields too:foreach (k, v in self.map) {...}
orforeach (k, v in struct.map) {...}
.struct Foo {x: Int}
is valid syntax now.{ let x: Int = 42 }
is valid syntax now.let
-statements are optional now:let x = 42
is valid syntax now.stdlib functions
skipBits
in stdlib/std/cells.tact:extends mutates native skipBits(self: Slice, l: Int)
(used to returnInt
, now it'svoid
).loadBool
method for slices.fromCell
andfromSlice
methods for struct parsing.nativeThrowWhen
has been renamed tonativeThrowIf
.