From c9b0c65fdb3cbd3441bc1354d1daea50536bd08a Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Wed, 3 Apr 2024 16:56:34 -0400 Subject: [PATCH] gopls/internal/analysis/fillreturns: skip test if gotypesalias=1 It changes (improves) the behavior of the test; we will reenable it once the default has changed. Updates golang/go#65294 Change-Id: I716da405a9f0c03c303c4c0be8b738dd7c5ebdcd Reviewed-on: https://go-review.googlesource.com/c/tools/+/576137 Reviewed-by: Tim King Auto-Submit: Alan Donovan LUCI-TryBot-Result: Go LUCI --- gopls/internal/analysis/fillreturns/fillreturns_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gopls/internal/analysis/fillreturns/fillreturns_test.go b/gopls/internal/analysis/fillreturns/fillreturns_test.go index f7667660bf7..e7cc3c3d486 100644 --- a/gopls/internal/analysis/fillreturns/fillreturns_test.go +++ b/gopls/internal/analysis/fillreturns/fillreturns_test.go @@ -5,6 +5,8 @@ package fillreturns_test import ( + "os" + "strings" "testing" "golang.org/x/tools/go/analysis/analysistest" @@ -12,6 +14,11 @@ import ( ) func Test(t *testing.T) { + // TODO(golang/go#65294): delete once gotypesalias=1 is the default. + if strings.Contains(os.Getenv("GODEBUG"), "gotypesalias=1") { + t.Skip("skipping due to gotypesalias=1, which changes (improves) the result; reenable and update the expectations once it is the default") + } + testdata := analysistest.TestData() analysistest.RunWithSuggestedFixes(t, testdata, fillreturns.Analyzer, "a", "typeparams") }