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

[go] imported package name that coincides with a keyword gets highlighted like a keyword. #319

Open
takamori opened this issue Oct 5, 2020 · 1 comment

Comments

@takamori
Copy link
Contributor

takamori commented Oct 5, 2020

import "something/print"

func bar() {
	// print is a namespace here.
	print.Foo("hi")
}
@marijnh
Copy link
Member

marijnh commented Oct 6, 2020

Does the language allow this for proper keywords as well, or does the problem only exist for what the mode marks as 'builtin' words? I.e. could you import something named func or var and use it this way? (I'm not familiar enough with Go to quickly try this out.)

Patch 7b573f3 addresses this for builtins, which includes print.

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