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/types: constant values should reported as machine values for concrete types #8718

Open
griesemer opened this issue Sep 13, 2014 · 4 comments
Open
Assignees
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Sep 13, 2014

Feature request: The reported values of constants should be the respective machine
values (perhaps in addition to the precise values) if the constant type is not an
untyped type.
@griesemer griesemer self-assigned this Sep 13, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title go.tools/go/types: constant values should reported as machine values for concrete types x/tools/go/types: constant values should reported as machine values for concrete types Apr 14, 2015
@rsc rsc added this to the Unreleased milestone Apr 14, 2015
@rsc rsc removed this from the Unplanned milestone Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
@griesemer griesemer changed the title x/tools/go/types: constant values should reported as machine values for concrete types go/types: constant values should reported as machine values for concrete types Jul 31, 2015
@griesemer griesemer added this to the Go1.6 milestone Aug 24, 2015
@griesemer griesemer removed this from the Unreleased milestone Aug 24, 2015
@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Sep 29, 2015

Proposal:

// TypeAndValue reports the type and value (for constants)
// of the corresponding expression. If the constant is used in
// an expression at run time (for instance in an assignment),
// GoValue contains the corresponding machine (materialized)
// value. The type of GoValue is the underlying type of the
// constant (a Go basic type permissible as constant type).
type TypeAndValue struct {
    mode  operandMode
    Type  Type
    Value constant.Value
    GoValue interface{}
}

@rsc
Copy link
Contributor

@rsc rsc commented Nov 30, 2015

Too late for Go 1.6.

@rsc rsc added this to the Unplanned milestone Nov 30, 2015
@rsc rsc removed this from the Go1.6 milestone Nov 30, 2015
@griesemer griesemer added this to the Go1.9Maybe milestone Feb 25, 2017
@griesemer griesemer removed this from the Unplanned milestone Feb 25, 2017
@griesemer griesemer added this to the Go1.10 milestone May 9, 2017
@griesemer griesemer removed this from the Go1.9Maybe milestone May 9, 2017
@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Oct 26, 2017

Nice to have. Not for 1.10.

@griesemer griesemer removed this from the Go1.10 milestone Oct 26, 2017
@griesemer griesemer added this to the Go1.11 milestone Oct 26, 2017
@griesemer griesemer removed this from the Go1.11 milestone Apr 11, 2018
@griesemer griesemer added this to the Go1.12 milestone Apr 11, 2018
@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Apr 11, 2018

Not urgent. Moving to 1.12.

@griesemer griesemer removed this from the Go1.12 milestone Oct 11, 2018
@griesemer griesemer added this to the Unplanned milestone Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants