Skip to content

allow call options as a post-fix expression#853

Closed
OmarTawfik wants to merge 1 commit intoNomicFoundation:mainfrom
OmarTawfik-forks:call-options
Closed

allow call options as a post-fix expression#853
OmarTawfik wants to merge 1 commit intoNomicFoundation:mainfrom
OmarTawfik-forks:call-options

Conversation

@OmarTawfik
Copy link
Copy Markdown
Contributor

This allows stand-alone call options, without trailing arguments, which is legal:

msg.sender.call{value: msg.value-amountEth};

Fixes #850

This allows stand-alone call options, without trailing arguments, which is legal:

```solidity
msg.sender.call{value: msg.value-amountEth};
```

Fixes NomicFoundation#850
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 24, 2024

🦋 Changeset detected

Latest commit: d16c874

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nomicfoundation/slang Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Error: Expected Identifier.
╭─[crates/solidity/testing/snapshots/cst_output/TryStatement/try_catch/input.sol:1:12]
1 │ try a.b() {} catch {}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

even though a NamedArgument is required inside {}, it is matched successfully as a post-fix expression, and thus, failing for expecting the try body afterwards.

@OmarTawfik
Copy link
Copy Markdown
Contributor Author

Converting to draft until #862 is ready.

@OmarTawfik OmarTawfik marked this pull request as draft February 28, 2024 07:56
auto-merge was automatically disabled February 28, 2024 07:56

Pull request was converted to draft

@OmarTawfik
Copy link
Copy Markdown
Contributor Author

Closing in favor of #862

@OmarTawfik OmarTawfik closed this Feb 29, 2024
@OmarTawfik OmarTawfik deleted the call-options branch February 29, 2024 09:27
github-merge-queue bot pushed a commit that referenced this pull request Mar 8, 2024
Based on #853 

Closes #850
Closes #861

---------

Co-authored-by: OmarTawfik <15987992+OmarTawfik@users.noreply.github.com>
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.

FunctionCallOptions without ArgumentsDeclaration

1 participant