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]: Type error in error statement. #219

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

[ICE]: Type error in error statement. #219

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

Comments

@Subway2023
Copy link

contract C {
    enum EnumType {A, B, C}

    struct StructType {
        uint x;
    }
    error E(EnumType StructType, StructType test);
}

solar --version: 0.1.1
solc can compile successfully, but solar throws an error. If I change EnumType StructType to EnumType otherName, the error does not occur.

error: name has to refer to a valid user-defined type
 --> getSeed/seed/error_param_type_shadowed_by_param_name.sol:7:34
  |
7 |     error E(EnumType StructType, StructType test);
  |                                  ^^^^^^^^^^
  |
@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