>10 views in one contract Assert_failure error
If I trying to compile contract with more than 10 views using docker LIGO 0.38.1
I am getting following error:
docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.38.1 compile contract example_contract.ligo -e main --protocol hangzhou > example_contract.tz
An internal error ocurred. Please, contact the developers.
"Assert_failure src/stages/6-ast_aggregated/helpers.ml:54:6".
I was able to reproduce this bug with simplest example_contract.ligo
with 11 views:
function main(const _p : unit; const s : nat) is ((nil: list(operation)), s)
[@view] function view_1(const _ : unit; const s: nat) is s
[@view] function view_2(const _ : unit; const s: nat) is s
[@view] function view_3(const _ : unit; const s: nat) is s
[@view] function view_4(const _ : unit; const s: nat) is s
[@view] function view_5(const _ : unit; const s: nat) is s
[@view] function view_6(const _ : unit; const s: nat) is s
[@view] function view_7(const _ : unit; const s: nat) is s
[@view] function view_8(const _ : unit; const s: nat) is s
[@view] function view_9(const _ : unit; const s: nat) is s
[@view] function view_10(const _ : unit; const s: nat) is s
[@view] function view_11(const _ : unit; const s: nat) is s
If any of these views removed - compilation succeed.
Also I was able to have >10 views compiling using ligo:0.34.0
Edited by Stepan Naumov