Skip to content

Functional Updates (nested updates) internal error and missing file

The Nested updates section in the Record and Maps Language Basics docs feature an example defining the change_color_preference function.

When running that function, an internal error is produced:

Screenshot_from_2021-03-16_12-26-09

ligo: internal error, uncaught exception:
      (Invalid_argument List.combine)
      Raised at file "stdlib.ml", line 30, characters 20-45
      Called from file "list.ml", line 263, characters 36-49
      Called from file "list.ml", line 263, characters 36-49
      Called from file "src/passes/15-stacking/decompiler.ml", line 11, characters 70-90
      Called from file "src/main/decompile/of_michelson.ml", line 17, characters 49-93
      Called from file "src/main/decompile/of_michelson.ml", line 33, characters 32-95
      Called from file "trace.ml" (inlined), line 255, characters 17-25
      Called from file "trace.ml" (inlined), line 280, characters 18-25
      Called from file "src/bin/cli.ml", line 492, characters 6-1023
      Called from file "cmdliner_term.ml", line 25, characters 19-24
      Called from file "cmdliner.ml", line 26, characters 27-34
      Called from file "cmdliner.ml", line 117, characters 32-39

Also, the docs reference the original source code as living in gitlab-pages/docs/language-basics/src/maps-records/record_nested_update.ligo, however, that file is missing from the repo.