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

[ICE]: Duplicate naming in catch causes an error. #217

Open
Subway2023 opened this issue Mar 2, 2025 · 0 comments
Open

[ICE]: Duplicate naming in catch causes an error. #217

Subway2023 opened this issue Mar 2, 2025 · 0 comments
Labels
C-bug Category: this is a bug

Comments

@Subway2023
Copy link

contract C {
    function f() public returns (uint, uint) {
        try this.f() {

        } catch Error(string memory x) {
            x;

        } catch (bytes memory x) {
            x;
        }
    }
}

solar --version: 0.1.1
solc can compile successfully, but solar throws an error.

error: identifier `x` already declared
 --> getSeed/seed/two_catch_clauses.sol:5:37
  |
5 |         } catch Error(string memory x) {
  |                                     - note: previous declaration declared here
6 |             x;
7 |
8 |         } catch (bytes memory x) {
  |                               ^
  |

error: aborting due to 1 previous error
@Subway2023 Subway2023 added the C-bug Category: this is a bug label Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: this is a bug
Projects
None yet
Development

No branches or pull requests

1 participant