itemisCREATE / solidity-ide

Solidity plugin for Eclipse
Eclipse Public License 1.0
86 stars 25 forks source link

Quickfix "Use "pure" instead." does nothing #296

Open Mazesch opened 5 years ago

Mazesch commented 5 years ago

The following code has a quickfix which should change the mutability to "pure" but it does nothing.

pragma solidity ^0.5.4;
contract Contract {
    function id(uint a) external returns (uint) {
        return a;
    }
}
Mazesch commented 5 years ago

It seems like there is no "@Fix" annotation for a case where no mutabillity is specified and the suggested one would be pure. The case at the moment is to always call declareFunctionAsPure if the mutabillity could be changed to pure(because the function allows it) but if no mutabillity is given and the function still allows for pure it should trigger another "@Fix" function or the text should be changed