-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Closed
Copy link
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.help wanted
Milestone
Description
What did you do?
Mouse over a hex/binary notation integer
const hex, bin, oct = 0xe34e, 0b10101, 071
// Mouse over variable name `hex` or `bin` shows decimal representation
c := hex * bin
What did you expect to see?
The literal used to declare the const
. Usually when one declares a const in hex, binary or octal representation it carries with it a significance, to aid the reader of the code. If we wrote programs for machines gofmt
would convert these literals to decimals or whatever the computer like.
With the philosophy out of the way, I expected to see:
const hex untyped int = 0xe34e (58190)
const bin untyped int = 0b10101 (21)
.
What did you see instead?
The usual gopls
help string of
const hex untyped int = 58190
const bin untyped int = 21
.
programmer04
Metadata
Metadata
Assignees
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.help wanted