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

The error handling component cannot output all compile-time errors. #15522

Open
haoyang9804 opened this issue Oct 17, 2024 · 1 comment
Open
Labels

Comments

@haoyang9804
Copy link
Contributor

Description

The following test program includes two compile-time errors: 1) struct_instance9, of storage pointer type, is accessed without prior assignment; and 2) Type uint256 is not implicitly convertible to expected type uint64 at line uint64 a = 11 << b;.
However, the second error seems to suppress the throw-out of the first error message. The compiler only reports the second error. If I comment out the whole contract C, the first error will be reported.

contract contract0 {
  struct struct1 {
    bool b;
  }

  function func5() public returns (uint256 var7) {
    struct1 storage struct_instance9;
    return struct_instance9.b ? 1 : 0;
  }
}

contract C {
  function f() external returns (uint64 b) {
    uint64 a = 11 << b;
  }
}

Environment

  • Compiler version:0.8.28-develop
@manvirsingh1716

This comment was marked as off-topic.

@ethereum ethereum deleted a comment Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants