Resolve "Internal error: `ligo compile storage`"
Motivation and Context
Related Issue: #1517 (closed)
Description
This MR does what has been suggested in #1517 (closed), to type the storage/parameter expression annotated with the expected type.
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to not work as expected) -
Performance improvement (non-breaking change that improves performance) -
None (change with no changelog)
Changelog
Example file
$ cat annotated_storage_and_parameter.mligo
type storage = (int, int) map
type parameter = int list
let main ((_p, s) : parameter * storage) : operation list * storage =
([], s)
Before fix
$ ligo compile storage annotated_storage_and_parameter.mligo "Map.empty"
File "src/passes/14-spilling/compiler.ml", line 180, characters 36-43
corner case: For all type uncaught
Sorry, we don't have a proper error message for this error. Please report this use case so we can improve on this.
After fix
$ ligo compile storage annotated_storage_and_parameter.mligo "Map.empty"
{}
Checklist:
-
Changes follow the existing coding style (use dune @fmt
to check). -
Tests for the changes have been added (for bug fixes / feature). -
Documentation has been updated. -
Changelog description has been added (if appropriate). -
Start titles under ## Changelog
section with #### (if appropriate). -
There is no image or uploaded file in changelog -
Examples in changed behaviour have been added to the changelog (for breaking change / feature).
Closes #1517 (closed)
Edited by E. Rivas