Skip to content

[ICE]: Setting the selector to public causes an error. #15988

Open
@Subway2023

Description

@Subway2023

solc version: 0.8.29
description: The statement bytes4 public constant s2 = B.g.selector; causes a compilation error, but removing public resolves the issue.

interface A {
    function f() external;
}
contract B {
    function g() public {}
}
contract C is B {
    function h() external {}
    bytes4 constant s1 = A.f.selector;
    bytes4 public constant s2 = B.g.selector;
    bytes4 constant s3 = this.h.selector;
    bytes4 constant s4 = super.g.selector;
}
solc_0829 test.sol --combined-json bin,abi --via-ir --optimize

Uncaught exception:
Dynamic exception type: std::out_of_range
std::exception::what: map::at

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions