Gaith Hallak
7b6eba5319
Introduce contract-level compile-time constants ( #432 )
...
* Allow compile-time constants as toplevel declarations
* Remove the test that fails on toplevel consts
* Warn when shadowing a constant
* Allow records to be used as compile time constants
* Allow data constructors in compile-time constants
* Disable some warnings for toplevel constants
Since variables and functions cannot be used in the definition of
a compile time constants, the following warnings are not going to be
reported:
* Used/Unused variable
* Used/Unused function
* Do not reverse constants declarations
* Add tests for all valid expressions
* Add test for accessing const from namespace
* Revert "Do not reverse constants declarations"
This reverts commit c4647fadacd134866e4be9c2ab4b0d54870a35fd.
* Add test for assigining constant to a constant
* Show empty map or record error when assigning to const
* Report all invalid constant expressions before fail
* Allow accessing records fields in toplevel consts
* Undo a mistake
* Add test for warning on const shadowing
* Show error message when using pattern matching for consts
* Remove unused error
* Ban toplevel constants in contract interfaces
* Varibles rename
* Change the error message for invalid_const_id
* Make constants public in namespaces and private in contracts
* Add a warning about unused constants in contracts
* Use ban_when_const for function applications
* Test for qualified access of constants in functions
* Add failing tests
* Add test for the unused const warning
* Update CHANGELOG
* Update all_syntax test file
* Treat expr and type inside bound as bound
* Allow typed ids to be used for constants
* List valid exprs in the error message for invalid exprs
* Fix tests
* Update the docs about constants
* Update syntax docs
* Check validity of const exprs in a separate functions
* Call both resolve_const and resolve_fun from resolve_var
2023-04-12 14:20:41 +03:00
..
2019-08-14 13:53:58 +02:00
2021-05-18 12:21:57 +02:00
2020-03-30 14:52:16 +02:00
2021-05-18 12:21:57 +02:00
2021-05-18 12:21:57 +02:00
2020-02-03 12:52:00 +01:00
2022-07-25 19:48:46 +04:00
2019-06-14 10:27:07 +02:00
2023-04-12 14:20:41 +03:00
2021-05-18 12:21:57 +02:00
2021-09-11 16:18:30 +02:00
2021-09-11 16:18:30 +02:00
2021-05-18 12:21:57 +02:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2020-03-30 14:52:16 +02:00
2019-09-09 18:40:45 +02:00
2019-09-09 18:40:45 +02:00
2019-06-28 09:42:28 +02:00
2019-06-28 09:42:28 +02:00
2020-05-15 19:09:08 +02:00
2019-06-28 09:42:28 +02:00
2020-02-21 10:28:55 +01:00
2021-05-18 12:21:57 +02:00
2019-12-09 08:45:55 +01:00
2021-01-25 21:28:10 +01:00
2021-05-18 12:21:57 +02:00
2020-03-30 14:52:16 +02:00
2020-02-11 10:00:46 +01:00
2019-09-12 21:17:01 +02:00
2019-08-21 09:29:40 +02:00
2019-06-28 09:42:28 +02:00
2019-06-28 09:42:28 +02:00
2019-09-09 18:40:45 +02:00
2019-06-28 09:42:28 +02:00
2020-02-21 09:45:11 +01:00
2022-11-23 12:03:24 +03:00
2019-09-03 14:47:13 +02:00
2019-02-08 14:16:06 +01:00
2021-07-05 09:29:43 +02:00
2022-07-25 19:48:46 +04:00
2021-05-18 12:21:57 +02:00
2021-05-18 12:21:57 +02:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-10-23 15:01:28 +03:00
2021-05-18 12:21:57 +02:00
2019-06-28 09:42:28 +02:00
2021-05-18 12:21:57 +02:00
2019-08-14 13:53:58 +02:00
2019-08-14 13:53:58 +02:00
2019-08-14 13:53:58 +02:00
2019-08-14 13:53:58 +02:00
2019-08-14 13:53:58 +02:00
2019-06-28 09:42:28 +02:00
2022-05-25 17:59:46 +04:00
2020-03-30 14:52:16 +02:00
2022-10-23 15:01:28 +03:00
2021-05-18 12:21:57 +02:00
2021-05-18 12:21:57 +02:00
2021-05-18 12:21:57 +02:00
2019-05-27 12:04:38 +02:00
2021-09-30 19:11:00 +02:00
2019-06-28 09:42:28 +02:00
2019-06-28 09:42:28 +02:00
2020-10-09 18:41:30 +02:00
2020-03-30 14:52:16 +02:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2023-01-12 16:23:36 +03:00
2021-05-18 12:21:57 +02:00
2019-06-28 09:42:28 +02:00
2019-02-08 14:16:06 +01:00
2019-02-08 14:16:06 +01:00
2019-09-03 16:51:04 +02:00
2019-06-28 09:42:28 +02:00
2021-05-18 12:21:57 +02:00
2020-05-15 19:09:08 +02:00
2019-12-12 09:39:13 +01:00
2019-12-16 17:04:49 +01:00
2021-05-18 12:21:57 +02:00
2019-08-14 13:53:58 +02:00
2019-08-14 13:53:58 +02:00
2019-08-14 13:53:58 +02:00
2019-08-27 14:00:23 +02:00
2022-06-14 12:22:32 +04:00
2019-09-03 14:35:13 +02:00
2019-07-22 13:56:45 +02:00
2022-07-25 19:48:46 +04:00
2021-05-18 12:21:57 +02:00
2019-06-28 09:42:28 +02:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2019-06-28 09:42:28 +02:00
2019-07-22 13:56:45 +02:00
2020-02-21 09:45:11 +01:00
2020-03-30 14:52:16 +02:00
2021-05-18 12:21:57 +02:00
2021-05-18 12:21:57 +02:00
2022-07-25 19:48:46 +04:00
2019-06-28 09:42:28 +02:00
2022-05-10 18:27:06 +04:00
2022-05-10 18:27:06 +04:00
2022-05-10 18:27:06 +04:00
2019-02-08 14:16:06 +01:00
2021-05-18 12:21:57 +02:00
2019-08-14 13:53:58 +02:00
2021-10-20 11:04:00 +03:00
2021-05-18 12:21:57 +02:00
2020-03-30 14:52:16 +02:00
2020-03-30 14:52:16 +02:00
2020-03-30 14:52:16 +02:00
2022-06-03 13:12:23 +04:00
2019-01-25 16:09:31 +01:00
2019-07-22 13:56:45 +02:00
2019-11-27 10:57:24 +01:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2021-10-20 11:04:00 +03:00
2019-08-19 08:57:31 +02:00
2022-04-12 12:40:32 +03:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2022-11-17 11:40:57 +03:00
2022-11-17 11:40:57 +03:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-11-17 11:40:57 +03:00
2022-11-17 11:40:57 +03:00
2022-11-17 11:40:57 +03:00
2022-11-17 11:40:57 +03:00
2022-11-17 11:40:57 +03:00
2022-11-17 11:40:57 +03:00
2022-08-03 22:24:22 +02:00
2022-08-03 22:24:22 +02:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-06-17 13:09:07 +04:00
2022-10-04 12:40:50 +03:00
2022-10-04 12:40:50 +03:00
2022-06-17 13:09:07 +04:00
2021-05-18 12:21:57 +02:00
2019-12-12 09:34:26 +01:00
2021-12-16 13:54:06 +02:00
2021-05-18 12:21:57 +02:00
2022-10-23 15:01:28 +03:00
2019-06-28 09:42:28 +02:00
2019-06-28 09:42:28 +02:00
2022-10-23 15:01:28 +03:00
2020-01-15 09:41:03 +01:00
2021-05-18 12:21:57 +02:00
2021-10-20 11:04:00 +03:00
2021-05-18 12:21:57 +02:00
2019-08-27 14:10:40 +02:00
2020-02-21 09:45:11 +01:00
2019-08-05 14:33:53 +02:00
2022-06-17 13:09:07 +04:00
2023-04-12 14:20:41 +03:00
2023-04-12 14:20:41 +03:00
2023-04-12 14:20:41 +03:00
2023-04-12 14:20:41 +03:00
2023-04-12 14:20:41 +03:00
2023-04-12 14:20:41 +03:00
2019-08-30 11:18:20 +02:00
2021-05-18 12:21:57 +02:00
2019-09-14 12:12:55 +02:00
2022-05-10 15:33:59 +02:00
2022-07-25 19:48:46 +04:00
2022-07-25 19:48:46 +04:00
2019-09-23 14:04:09 +02:00
2022-11-23 12:03:24 +03:00
2021-09-07 17:45:28 +03:00
2021-09-07 17:45:28 +03:00
2021-09-07 17:45:28 +03:00
2021-09-07 17:45:28 +03:00
2021-09-07 17:45:28 +03:00
2021-09-07 17:45:28 +03:00
2020-02-24 15:35:54 +01:00
2019-11-15 14:22:44 +01:00
2019-11-15 14:22:44 +01:00
2019-11-15 14:22:44 +01:00
2022-11-01 18:10:57 +02:00
2022-11-01 18:10:57 +02:00
2019-06-28 09:42:28 +02:00
2019-09-03 16:51:04 +02:00
2020-03-30 14:52:16 +02:00
2019-09-03 16:51:04 +02:00
2023-03-21 13:55:18 +03:00
2023-04-12 14:20:41 +03:00
2019-09-27 17:31:10 +02:00