Gaith Hallak
274bb4e197
Call both resolve_const and resolve_fun from resolve_var
2023-04-12 13:02:24 +03:00
Gaith Hallak
521b382dd7
Check validity of const exprs in a separate functions
2023-04-12 13:02:24 +03:00
Gaith Hallak
da6d4877d6
Update syntax docs
2023-04-12 13:02:24 +03:00
Gaith Hallak
442c3a5625
Update the docs about constants
2023-04-12 13:02:24 +03:00
Gaith Hallak
2bafa3771e
Fix tests
2023-04-12 13:01:56 +03:00
Gaith Hallak
ad851854be
List valid exprs in the error message for invalid exprs
2023-04-12 13:01:56 +03:00
Gaith Hallak
d34760b990
Allow typed ids to be used for constants
2023-04-12 13:01:56 +03:00
Gaith Hallak
51935f8388
Treat expr and type inside bound as bound
2023-04-12 13:01:56 +03:00
Gaith Hallak
6308f009ca
Update all_syntax test file
2023-04-12 13:01:56 +03:00
Gaith Hallak
6a5eff6db3
Update CHANGELOG
2023-04-12 13:01:56 +03:00
Gaith Hallak
e756f935f2
Add test for the unused const warning
2023-04-12 13:00:42 +03:00
Gaith Hallak
be7133dec7
Add failing tests
2023-04-12 13:00:42 +03:00
Gaith Hallak
0e154f96fa
Test for qualified access of constants in functions
2023-04-12 12:55:24 +03:00
Gaith Hallak
95d372c718
Use ban_when_const for function applications
2023-04-12 12:55:24 +03:00
Gaith Hallak
42c34ce3d8
Add a warning about unused constants in contracts
2023-04-12 12:55:24 +03:00
Gaith Hallak
ec119a90c5
Make constants public in namespaces and private in contracts
2023-04-12 12:55:24 +03:00
Gaith Hallak
9174b90986
Change the error message for invalid_const_id
2023-04-12 12:55:24 +03:00
Gaith Hallak
342126b60e
Varibles rename
2023-04-12 12:55:24 +03:00
Gaith Hallak
b23d40e1e6
Ban toplevel constants in contract interfaces
2023-04-12 12:55:24 +03:00
Gaith Hallak
162ad4667e
Remove unused error
2023-04-12 12:55:24 +03:00
Gaith Hallak
0c2421c528
Show error message when using pattern matching for consts
2023-04-12 12:55:24 +03:00
Gaith Hallak
28b26ea4cc
Add test for warning on const shadowing
2023-04-12 12:55:24 +03:00
Gaith Hallak
de34fc1122
Undo a mistake
2023-04-12 12:55:24 +03:00
Gaith Hallak
80645222ad
Allow accessing records fields in toplevel consts
2023-04-12 12:55:24 +03:00
Gaith Hallak
7d61d247f7
Report all invalid constant expressions before fail
2023-04-12 12:55:24 +03:00
Gaith Hallak
e64bdd40d2
Show empty map or record error when assigning to const
2023-04-12 12:55:24 +03:00
Gaith Hallak
77be5750f3
Add test for assigining constant to a constant
2023-04-12 12:55:24 +03:00
Gaith Hallak
aa8ae76aca
Revert "Do not reverse constants declarations"
...
This reverts commit c4647fadacd134866e4be9c2ab4b0d54870a35fd.
2023-04-12 12:55:24 +03:00
Gaith Hallak
112e5338da
Add test for accessing const from namespace
2023-04-12 12:55:24 +03:00
Gaith Hallak
c6bdb15693
Add tests for all valid expressions
2023-04-12 12:55:24 +03:00
Gaith Hallak
98c521d90a
Do not reverse constants declarations
2023-04-12 12:55:24 +03:00
Gaith Hallak
a9548e77d8
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
2023-04-12 12:55:24 +03:00
Gaith Hallak
719dfdf240
Allow data constructors in compile-time constants
2023-04-12 12:55:24 +03:00
Gaith Hallak
cb817d6c76
Allow records to be used as compile time constants
2023-04-12 12:55:24 +03:00
Gaith Hallak
e438fbbaf4
Warn when shadowing a constant
2023-04-12 12:55:24 +03:00
Gaith Hallak
2dfe5eefb0
Remove the test that fails on toplevel consts
2023-04-12 12:55:24 +03:00
Gaith Hallak
49f73f8201
Allow compile-time constants as toplevel declarations
2023-04-12 12:55:24 +03:00
Gaith Hallak
99bb3fe1fb
Mark only included files as potentially unused ( #442 )
...
* Mark only included files as potentially unused
* Update CHANGELOG
* Add test
2023-03-21 13:55:18 +03:00
Hans Svensson
311bf49505
Prepare v7.1.0 release ( #438 )
v7.1.0
2023-02-24 09:40:06 +01:00
Denis Davidyuk
0e3bcba07d
Fix markup in sophia_features.md ( #437 )
2023-02-15 13:27:29 +03:00
Marco Walz
699d1f7ab8
fix: use latest pygments version to generate docs ( #435 )
2023-02-02 08:32:54 +01:00
Marco Walz
1a40a93157
chore(deps): mkdocs version update ( #434 )
2023-02-02 10:16:27 +03:00
Gaith Hallak
c078119bc4
Add hole expression ( #433 )
...
* Add hole expressions
* Fix the issue of unreported holes
* Add tests
* New line in the end of the test file
* Update CHANGELOG
* Add hole expression to the docs
* Do not treat hole as a special type
* Update docs
* Update docs/sophia_features.md
Co-authored-by: Radosław Rowicki <35342116+radrow@users.noreply.github.com>
Co-authored-by: Radosław Rowicki <35342116+radrow@users.noreply.github.com>
2023-01-12 16:23:36 +03:00
Gaith Hallak
31fd8fe24f
Hide warning when calling with non-0 value arg ( #431 )
...
* Hide warning when calling with non-0 value arg
* Update the tests
* Update CHANGELOG
2022-12-12 11:44:24 +03:00
Nikita Fuchs
9ad8e26e88
Add clarification for Chain.timestamp in the stdlib docs ( #429 )
2022-12-07 17:34:55 +03:00
Gaith Hallak
5adeb6c93e
Ban using contracts as namespaces ( #428 )
...
* Ban calling contracts functions as functions namespaces
* Ban using contracts as namespaces
* Add tests
* Update CHANGELOG
* Separate guards with a semicolon
2022-11-23 12:03:24 +03:00
Gaith Hallak
256df25af4
Check contracts and entrypoints modifiers when implementing interfaces ( #427 )
...
* Check contracts and entrypoints modifiers when implementing interfaces
* Fix existing tests
* Add passing tests
* Add failing tests
* Update docs
* Update CHANGELOG
2022-11-17 11:40:57 +03:00
Gaith Hallak
83abfae32b
Ban the unification of uvars and var_args functions ( #423 )
...
* Ban the unification of uvar and var_args function
* Update CHANGELOG
* Fix the tests
* Undo indent
* Change the error message for unify_varargs
2022-11-01 18:10:57 +02:00
Denis Davidyuk
4ca90feea0
Rename type_defs
to typedefs
in ACI to increase compatibility ( #421 )
2022-11-01 08:55:00 +02:00
Gaith Hallak
09638daa90
Return mapping from variables to registers in fate compilation ( #411 )
...
* Return mapping from variables to registers
* Fix dialyzer issues
* Record real names
* Report saved fresh names as part of fcode env
* Undo whitespace changes
* Fix dialyzer warnings
* Formatting fix
* Use function names as strings
* Manually handle making function names
* Update CHANGELOG
* Make variables registers optional
* Update docs about the new flag
* Remove empty saved_fresh_names map from fcode env
2022-10-25 09:42:02 +03:00