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

fmt: remove the prefixed module name of the const name in same module. (related #22183) #22185

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

yuyi98
Copy link
Member

@yuyi98 yuyi98 commented Sep 9, 2024

This PR remove the prefixed module name of the const name in same module.(related #22183)

  • Remove the prefixed module name of the const name in same module.
  • Modify all the related files and tests.
module tt1

const full_name = 'Robert the Tomato'

fn print_full_name() {
	println(full_name)
	println(full_name)
}

fn print_name() {
	println(name)
	println(name)
}
module tt1

const name = 'Bob'

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work 🥳 !
Less arbitrary rules and exceptions in v.fmt, producing shorter and cleaner code ❤️ .

@spytheman spytheman merged commit 008aaad into vlang:master Sep 10, 2024
76 checks passed
@yuyi98 yuyi98 deleted the remove_prefix_const branch September 10, 2024 08:54
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

Successfully merging this pull request may close these issues.

2 participants