Skip to content

Treat at as a reserved keyword in Solidity #5577

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

Open
pcaversaccio opened this issue Mar 12, 2025 · 1 comment
Open

Treat at as a reserved keyword in Solidity #5577

pcaversaccio opened this issue Mar 12, 2025 · 1 comment
Milestone

Comments

@pcaversaccio
Copy link
Contributor

So I was reading through the Solidity 0.8.29 release and checked the new Custom Storage Layout documentation. It's written there:

The identifiers layout and at are not yet reserved as keywords in the language. It is strongly recommended to avoid using them since they will become reserved in a future breaking release.

Now, when I read this I remembered the various at functions in OZ (I probably missed some):

function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}

function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}

function at(Trace224 storage self, uint32 pos) internal view returns (Checkpoint224 memory) {
return self._checkpoints[pos];
}

function at(Trace208 storage self, uint32 pos) internal view returns (Checkpoint208 memory) {
return self._checkpoints[pos];
}

function at(Trace160 storage self, uint32 pos) internal view returns (Checkpoint160 memory) {
return self._checkpoints[pos];
}

@Amxx Amxx added this to the 6.0 milestone Mar 13, 2025
@Amxx
Copy link
Collaborator

Amxx commented Mar 13, 2025

Thank you @pcaversaccio for raising this.

Unfortunatelly, changing the function name would be a breaking change, so I don't think we should do that in 5.x. I would do it in 6.0, which will probably coincide with a bump of solidty version that makes the at keyword reserved anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants