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

Don't add external modifier to fallback functions #778

Open
fvictorio opened this issue Dec 28, 2022 · 3 comments
Open

Don't add external modifier to fallback functions #778

fvictorio opened this issue Dec 28, 2022 · 3 comments

Comments

@fvictorio
Copy link
Member

This:

contract Foo {
  fallback() {}
}

when formatted, gets an added external modifier. This is useful in a lot of situations, but I don't think we should do it. In the same vein as issues like #662, we should avoid making this kind of non-strictly-formatting change.

@Janther
Copy link
Contributor

Janther commented Dec 28, 2022

the printer doesn't make that decision. We print exactly the visibility that the parser gives us.

const visibility = (node) =>
node.visibility && node.visibility !== 'default'
? [line, node.visibility]
: '';

@fvictorio
Copy link
Member Author

I will open an issue in the parser about this.

@fvictorio
Copy link
Member Author

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