v0.9.0-alpha "Iridium"
Pre-release
Pre-release
·
1359 commits
to master
since this release
0.9.0-alpha "Iridium"
Features
-
The
self
variable is no longer implicitly defined in code blocks. It must now be declared
as the first parameter in a function signature.Example:
contract Foo: my_stored_num: u256 pub fn bar(self, my_num: u256): self.my_stored_num = my_num pub fn baz(self): self.bar(my_pure_func()) pub fn my_pure_func() -> u256: return 42 + 26
(#520)
- The analyzer now disallows defining a type, variable, or function whose
name conflicts with a built-in type, function, or object.
Example:error: type name conflicts with built-in type ┌─ compile_errors/shadow_builtin_type.fe:1:6 │ 1 │ type u256 = u8 │ ^^^^ `u256` is a built-in type
(#539)
Bugfixes
- Fixed cases where the analyzer would correctly reject code, but would panic instead of logging an error message. (#534)
- Non-fatal parser errors (eg missing parentheses when defining a function that takes no arguments:
fn foo:
)
are no longer ignored if the semantic analysis stage succeeds. (#535) - Fixed issue #531 by adding a
$
to the front of lowered tuple names. (#546)
Internal Changes - for Fe Contributors
- Implemented pretty printing of Fe AST. (#540)