diff options
| author | Alan Donovan <adonovan@google.com> | 2025-01-28 13:44:41 -0500 |
|---|---|---|
| committer | Alan Donovan <adonovan@google.com> | 2025-03-05 10:21:15 -0800 |
| commit | 932a4a4befc804fc5f94c12e1e430442557875fe (patch) | |
| tree | 7388087b6d379c23f88ffa1857718cc545b9a7aa /api | |
| parent | 2c1604142324be55a9274bc13a5a143bb3cde809 (diff) | |
| download | go-932a4a4befc804fc5f94c12e1e430442557875fe.tar.xz | |
go/types: add Var.Kind() VarKind method
This CL adds an enum type, VarKind, that discriminates among
the various kinds of Var, and adds setter/getter methods
for Var's kind field.
Beware: NewVar has a weaker postcondition: the Var objects it
returns are not completely initialized and require a call to
Var.SetKind. This should only affect importers.
No changes are needed to the export data, since the kind can
always be deduced from the context when decoding.
See CL 645656 for the corresponding x/tools changes.
+ test, relnote, API
Updates golang/go#70250
Change-Id: Icde86ad22a880cde6f50bc12bf38004a5c6a1025
Reviewed-on: https://go-review.googlesource.com/c/go/+/645115
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'api')
| -rw-r--r-- | api/go1.25.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/api/go1.25.txt b/api/go1.25.txt new file mode 100644 index 0000000000..8cd7b1d8fc --- /dev/null +++ b/api/go1.25.txt @@ -0,0 +1,16 @@ +pkg go/types, const FieldVar = 6 #70250 +pkg go/types, const FieldVar VarKind #70250 +pkg go/types, const LocalVar = 2 #70250 +pkg go/types, const LocalVar VarKind #70250 +pkg go/types, const PackageVar = 1 #70250 +pkg go/types, const PackageVar VarKind #70250 +pkg go/types, const ParamVar = 4 #70250 +pkg go/types, const ParamVar VarKind #70250 +pkg go/types, const RecvVar = 3 #70250 +pkg go/types, const RecvVar VarKind #70250 +pkg go/types, const ResultVar = 5 #70250 +pkg go/types, const ResultVar VarKind #70250 +pkg go/types, method (*Var) Kind() VarKind #70250 +pkg go/types, method (*Var) SetKind(VarKind) #70250 +pkg go/types, method (VarKind) String() string #70250 +pkg go/types, type VarKind uint8 #70250 |
