зеркало из https://github.com/golang/tools.git
e751756721
Refactors the ZeroExpr and ZeroString functions to provide more consistent and correct handling of zero values for input types. - Refactor: Unify similar switch case statements in both functions with exception of types.Tuple. ZeroExpr panic due to the lack of a valid ast.Expr representation. - Fixing an issue where ZeroExpr returned nil for types.Array instead of a composite literal. - Adding support for type parameters in ZeroExpr, similar to ZeroString. - Consolidating tests for both functions into TestZeroValue. Change-Id: Ic77ae17ea091cf51bd4d4642186fe13093e0d461 Reviewed-on: https://go-review.googlesource.com/c/tools/+/627604 Reviewed-by: Tim King <taking@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Hongxiang Jiang <hxjiang@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> |
||
---|---|---|
.. | ||
deprecated | ||
embeddirective | ||
fillreturns | ||
fillstruct | ||
fillswitch | ||
infertypeargs | ||
nonewvars | ||
noresultvalues | ||
simplifycompositelit | ||
simplifyrange | ||
simplifyslice | ||
unusedparams | ||
unusedvariable | ||
useany | ||
yield |