Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduces a new syntax for invoking the finalize block. #2172

Merged
merged 15 commits into from
Nov 23, 2022

Conversation

d0cd
Copy link
Collaborator

@d0cd d0cd commented Nov 13, 2022

The existing syntax for invoking the finalize block is async finalize(<args>);.
This syntax is being deprecated in favor of return <expr> then finalize(<args>);.

TODO:

  • More tests.
  • Deprecation error for async.

@d0cd d0cd changed the base branch from testnet3 to feat/tuple November 13, 2022 02:28
@d0cd d0cd changed the title Changes async finalize(<args>)l to return <expr> then finalize(<args>); Introduces a new syntax for invoking the finalize block. Nov 13, 2022
@codecov
Copy link

codecov bot commented Nov 13, 2022

Codecov Report

Merging #2172 (f6f286a) into testnet3 (9e28591) will increase coverage by 0.18%.
The diff coverage is 95.95%.

@@             Coverage Diff              @@
##           testnet3    #2172      +/-   ##
============================================
+ Coverage     82.77%   82.95%   +0.18%     
============================================
  Files           149      148       -1     
  Lines          7226     7205      -21     
  Branches       7226     7205      -21     
============================================
- Hits           5981     5977       -4     
+ Misses         1245     1228      -17     
Impacted Files Coverage Δ
compiler/ast/src/passes/consumer.rs 86.20% <ø> (-0.46%) ⬇️
compiler/ast/src/passes/visitor.rs 85.71% <ø> (ø)
compiler/ast/src/statement/mod.rs 46.34% <ø> (+3.15%) ⬆️
compiler/parser/src/tokenizer/mod.rs 100.00% <ø> (ø)
compiler/passes/src/flattening/flatten_program.rs 97.29% <ø> (+1.14%) ⬆️
compiler/passes/src/type_checking/checker.rs 94.08% <ø> (ø)
compiler/span/src/symbol.rs 94.52% <ø> (ø)
compiler/parser/src/tokenizer/token.rs 65.86% <50.00%> (-0.20%) ⬇️
...s/src/static_single_assignment/rename_statement.rs 91.66% <87.50%> (+0.40%) ⬆️
compiler/parser/src/parser/statement.rs 97.54% <93.75%> (-0.48%) ⬇️
... and 12 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -83,7 +83,6 @@ mod tests {
test_ident
12345
address
async
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see async was removed from this tokenizer test but it is still in lexer.rs on line 397, is that so that it can detect the deprecated feature and report on it? If so maybe it should remain in the tokenizer test until taken out of the lexer?

Copy link
Collaborator

@bendyarm bendyarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Base automatically changed from feat/tuple to testnet3 November 23, 2022 01:49
@collinc97 collinc97 merged commit ae18c61 into testnet3 Nov 23, 2022
@collinc97 collinc97 deleted the feat/then-finalize branch November 23, 2022 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants