]> Cypherpunks repositories - gostls13.git/commit
go/types: remove the renaming import of go/constant
authorRob Pike <r@golang.org>
Mon, 3 Aug 2015 03:57:25 +0000 (13:57 +1000)
committerRob Pike <r@golang.org>
Tue, 4 Aug 2015 01:56:58 +0000 (01:56 +0000)
commitecead89be9e4cbd75f2bceeb8c288db5fcad311a
treedd6de8487375f3c86249812b85258e0f6afae993
parent2bd523707062b6059fcd11b9ec8fdf2237b14894
go/types: remove the renaming import of go/constant

For niceness, when go/exact was moved from x/tools, it
was renamed go/constant.

For simplicity, when go/types was moved from x/tools, its
imports of (now) go/constant were done with a rename:

    import exact "go/constant"

This kept the code just as it was before and avoided the issue
of what to call the internal constant called, um, constant.

But not all was hidden, as the text of some fields of structs and
the like leaked the old name, so things like "exact.Value" appeared
in type definitions and function signatures in the documentation.
This is unacceptable.

Fix the documentation issue by fixing the code. Rename the constant
constant constant_, and remove the renaming import.

This should go into 1.5. It's mostly a mechanical change, is
internal to the package, and fixes the documentation. It contains
no semantic changes except to fix a benchmark that was broken
in the original transition.

Fixes #11949.

Change-Id: Ieb94b6558535b504180b1378f19e8f5a96f92d3c
Reviewed-on: https://go-review.googlesource.com/13051
Reviewed-by: Russ Cox <rsc@golang.org>
15 files changed:
src/go/types/api.go
src/go/types/assignments.go
src/go/types/builtins.go
src/go/types/call.go
src/go/types/check.go
src/go/types/conversions.go
src/go/types/decl.go
src/go/types/expr.go
src/go/types/object.go
src/go/types/operand.go
src/go/types/resolver.go
src/go/types/self_test.go
src/go/types/stmt.go
src/go/types/typexpr.go
src/go/types/universe.go