x/tools/gopls: embedded types are tokenized as identifiers #46068
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
NeedsFix
The path to resolution is known, but the work has not been done.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What did you do?
Write the following code with semantic tokenizing enabled
What happened
Model
andattitude
are tokenized as identifiers (same color asV
), not types (color ofint
).What you expected
I expected
Model
andattitude
to be tokenized as types, they are after all user defined types. One could argue they can be accessed as if they were identifiers (product.Model
andproduct.attitude
) but this obfuscates what really is happening: the type is being embedded andModel
andattitude
are type names, not field names.Version info/env
What version of Go & gopls are you using (
go version
)?The text was updated successfully, but these errors were encountered: