What's Changed
💥 Language Breaking Changes
- Entitlements
- Parsing for Entitlements by @dsainati1 in #2363
- Type checking for entitlement and entitlement mapping declarations by @dsainati1 in #2441
- Type checking for authorized references by @dsainati1 in #2405
- Runtime behavior for entitlements by @dsainati1 in #2421
- Type checking for entitlement and entitlement mapping declarations by @dsainati1 in #2404
- Reference invalidation
- Remove Restricted Type from Cadence by @dsainati1 in #2596
- Remove
pub
,priv
andpub(set)
access modifiers by @dsainati1 in #2540 - View functions:
- Add machinery for parsing and checking
view
functions by @dsainati1 in #1818 - View Enforcement by @dsainati1 in #1870
- Enforce
view
in function conditions by @dsainati1 in #1871
- Add machinery for parsing and checking
- Remove deprecated key management API by @turbolent in #1842
- Fix ToBigEndianBytes implementations for U?Int(128|256) by @dreamsmasher in #1917
- Improve reference expressions by @turbolent in #2010
- Take argument labels into account when declaring members for nested declarations by @turbolent in #2013
- Improve resource tracking for optional binding by @turbolent in #2044
- Improve the definite return analysis by @turbolent in #2090
- Change for-loop variables from per-loop to per-iteration by @turbolent in #2024
- Reject cyclic imports during contract deployment by @SupunS in #2308
- Parser/syntax changes:
- Prevent keywords from being used as identifiers (redux) by @dreamsmasher in #1937
- Prevent keywords from being used as names in function declarations by @dreamsmasher in #2067
- Function type syntax change by @dreamsmasher in #2140
- Report preceding identifier in member declaration by @turbolent in #2231
⭐ Features
- Add interface inheritance by @SupunS in #2112
- Attachment Iteration by @dsainati1 in #2440
- Convert generic container types on upcast by @dsainati1 in #2567
- Allow emit statements in conditions by @turbolent in #2589
🛠 Improvements
- Add invalidation info to the invalid reference usage error by @SupunS in #2096
- Improve view modifier parsing and printing by @turbolent in #2117
- Make view a soft keyword by @dreamsmasher in #2121
- Add more purity annotations to built-in and standard library function types by @turbolent in #2125
- Export all keywords by @turbolent in #2131
- Add mapping function for types by @dsainati1 in #2425
- Improve formatting of access modifiers by @turbolent in #2597
- Improve cyclic import handling by @SupunS in #2632
🐞 Bug Fixes
- Fix test matcher by @turbolent in #2130
- Update Stable Cadence branch, fix view function expression parsing by @turbolent in #2141
- Transaction pre-conditions must also be
view
by @dsainati1 in #2171 - fix view parsing for expressions by @dreamsmasher in #2164
- Add attachment keywords to keyword lists by @dsainati1 in #2499
- Fix crash on entitlement mappings with empty outputs by @dsainati1 in #2592
- Make more
AuthAccount
functionsview
by @dsainati1 in #2666 - Fix entitlement memory metering by @SupunS in #2668
- Fix interface inheritance for nested interfaces by @dsainati1 in #2674
- Update reference invalidation check to consider optional resources by @SupunS in #2680
Other Changes
- Refactor reference tests by @SupunS in #2086
- Clean up function types and type annotations by @turbolent in #2126
- Optimize keyword testing by @turbolent in #2295
- backport #2302 to stable cadence (fix docstring parsing after functions) by @dreamsmasher in #2329
- Add tests for entitlement inheritance between interfaces by @dsainati1 in #2564
- Add cyclic imports tests by @SupunS in #2629
Full Changelog: v0.40.0...v0.41.0-stable-cadence.1