Skip to content

Linter complain on syntax to call create2 #294

@mfornet

Description

@mfornet

Description
It should pass but complains about syntax error during linting:

contracts/test/StateTest.sol
  22:48    error    Syntax error: unexpected token {

For the code:

contract SelfDestructFactory {
    constructor() { }

    function deploy() public returns(address) {
        address addr = address(new SelfDestruct{salt: bytes32(uint256(0x1234))}());
        return addr;
    }
}

Line 22, is: address addr = address(new SelfDestruct{salt: bytes32(uint256(0x1234))}());

Steps to reproduce
This section may contain all or a combination of the following:

  • The command you used to lint
  • The solidity code over which you ran the linter
  • Contents of your .soliumrc.json file
  • Contents of your .soliumignore

In addition, you may add anything you feel is relevant.

Operating System
MacOS 10.15.7

Linter version
Solium version 1.2.5

Comments
If you'd like to share any additional information that doesn't fit in above sections or suggest a solution to the maintainers.

Priority
Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions