Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

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

Open
Mazesch opened this issue Aug 8, 2019 · 1 comment · May be fixed by #306
Open

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

Mazesch opened this issue Aug 8, 2019 · 1 comment · May be fixed by #306
Assignees

Comments

@Mazesch
Copy link
Collaborator

Mazesch commented Aug 8, 2019

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 Mazesch self-assigned this Aug 8, 2019
@Mazesch
Copy link
Collaborator Author

Mazesch commented Aug 8, 2019

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

@Mazesch Mazesch assigned Mazesch and unassigned Mazesch Aug 8, 2019
@Mazesch Mazesch linked a pull request Aug 16, 2019 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant