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

Incorrect Handling of ** #222

Open
Subway2023 opened this issue Mar 2, 2025 · 1 comment
Open

Incorrect Handling of ** #222

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

Comments

@Subway2023
Copy link

contract LargeExponentTest {
    
    function test() public pure returns (uint256) {
        uint256 result = 10 ** 1e10;
        return result;
    }
}

solar --version: 0.1.1
solc reports an error when compiling this program, but solar does not.

solc test.sol

Error: Built-in binary operator ** cannot be applied to types int_const 10 and int_const 10000000000.
 --> test.sol:5:26:
  |
5 |         uint256 result = 10 ** 1e10;
  |                          ^^^^^^^^^^
@Subway2023 Subway2023 added the C-bug Category: this is a bug label Mar 2, 2025
@DaniPopes
Copy link
Member

Thanks for these reports, however solar is incomplete, so it's expected that a lot of errors reported in solc are not reported here, it would be best to report these as bugs once we actually implement these features.

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

2 participants