We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 following code is a simplified/minimized version of OpenZeppelin's ERC721 contract:
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.19; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } abstract contract ERC165 is IERC165 { function supportsInterface( bytes4 interfaceId ) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } } abstract contract ERC721 is ERC165 { function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC165) returns (bool) { return interfaceId == interfaceId; } }
This compiles with solc:
solc
$ solc testcase/override_errors/ERC721.sol Compiler run successful. No output generated.
but solang_parser fails to parse it:
solang_parser
$ solang_parser testcase/override_errors/ERC721.sol ===== Error: testcase/override_errors/ERC721.sol ===== error: function 'supportsInterface' missing overrides 'IERC165', specify 'override(IERC165,ERC165)' ┌─ testcase/override_errors/ERC721.sol:21:27 │ 21 │ ) public view virtual override(ERC165) returns (bool) { │ ^^^^^^^^^^^^^^^^
Further, solang_parser suggests the fix, which I have stored in testcase/override_errors/ERC721_suggested_fix.sol. solc failes to compile this:
testcase/override_errors/ERC721_suggested_fix.sol
$ solc testcase/override_errors/ERC721_suggested_fix.sol Error: Invalid contract specified in override list: "IERC165". --> testcase/override_errors/ERC721_suggested_fix.sol:21:27: | 21 | ) public view virtual override(IERC165, ERC165) returns (bool) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ Note: This contract: --> testcase/override_errors/ERC721_suggested_fix.sol:6:1: | 6 | interface IERC165 { | ^ (Relevant source part starts here and spans across multiple lines).
but solang_parser successfully parses it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following code is a simplified/minimized version of OpenZeppelin's ERC721 contract:
This compiles with
solc
:but
solang_parser
fails to parse it:Further,
solang_parser
suggests the fix, which I have stored intestcase/override_errors/ERC721_suggested_fix.sol
.solc
failes to compile this:but
solang_parser
successfully parses it.The text was updated successfully, but these errors were encountered: