Skip to content
New issue

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

Mutability check is incomplete #1493

Closed
LucasSte opened this issue Aug 17, 2023 · 0 comments · Fixed by #1544
Closed

Mutability check is incomplete #1493

LucasSte opened this issue Aug 17, 2023 · 0 comments · Fixed by #1544
Labels
bug Something isn't working

Comments

@LucasSte
Copy link
Contributor

Our implementation for the mutability check does not cover all cases needed and needs a major overhaul. The following contract, for instance, should not work because test is not a view function.

contract C {
	bool x;
	int[4] a;

	function test() public view returns (int) {
		return foo()[1];
	}

	function foo() internal returns (int[4] storage) {
		x = true;
		return a;
	}

}
@LucasSte LucasSte added the bug Something isn't working label Aug 17, 2023
LucasSte added a commit that referenced this issue Sep 19, 2023
Fixes #1493

Signed-off-by: Lucas Steuernagel <lucas.tnagel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant