Allow assigning patterns to variables (#336)

* Change syntax tree and parser

* Add assign pattern to type inference

* Use check_expr instead of hard-coded type

* Add fcode generation for assign pattern

* Implement rename_spat for assign pattern

* Add tests

* Update CHANGELOG.md

* Update docs and changelog

* Add letpat to aeso_syntax_utils:fold

* Use Plus instead of Scoped
This commit is contained in:
Gaith Hallak
2021-09-11 17:18:30 +03:00
committed by GitHub
parent a7b7aafced
commit e8a171dc45
11 changed files with 68 additions and 4 deletions
@@ -0,0 +1,4 @@
contract AssignPatternToPattern =
entrypoint f() =
let x::(t::z = y) = [1, 2, 3]
(x + t)::y