-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
forge fmt
formatting with Modifier-style base constructor call without arguments
compiler error
#5633
Comments
likely somewhere around here @Evalir foundry/crates/fmt/src/formatter.rs Lines 1433 to 1449 in a0a31c3
it's this most likely, could be that the loc does not include the trailing (), so we perhaps need to check manually foundry/crates/fmt/src/visit.rs Lines 255 to 257 in 410c817
|
Are there any updates? Maybe this formatting feature could be set in the config somehow? Also, need to mention that there are some differences between for (uint256 i = 0; i < length;) { // forge
for (uint256 i = 0; i < length; ) { // prettier
// forge
function linkThirdPartyToProfile(address _profileAddress, uint256 _thirdPartyId, uint256 _thirdPartyUserID)
external
onlyOperator
{
// prettier
function linkThirdPartyToProfile(
address _profileAddress,
uint256 _thirdPartyId,
uint256 _thirdPartyUserID
) external onlyOperator {
// forge
associatedWallets[_primaryWallet][_associatedWallet] =
WalletAssociation(true, primaryWallets[_primaryWallet].length);
// prettier
associatedWallets[_primaryWallet][_associatedWallet] = WalletAssociation(
true,
primaryWallets[_primaryWallet].length
); |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (dffdfde 2023-08-14T00:22:15.788827000Z)
What command(s) is the bug in?
forge fmt
Operating System
macOS (Apple Silicon)
Describe the bug
While formatting this piece of code with
forge fmt
, it removes parentheses forERC1155
inline derived constructor call. Then, the compiler gives such an error onforge build
:May it be caused by
SoulBound1155
contract as it is already derived fromERC1155
? Anyways, I think formatter should recognise it, and not changeERC1155()
toERC1155
The text was updated successfully, but these errors were encountered: