diff --git a/go/ssa/example_test.go b/go/ssa/example_test.go index cab0b8490..e0fba0be6 100644 --- a/go/ssa/example_test.go +++ b/go/ssa/example_test.go @@ -60,9 +60,6 @@ func main() { // syntax, perhaps obtained from golang.org/x/tools/go/packages. // In that case, see the other examples for simpler approaches. func Example_buildPackage() { - // Replace interface{} with any for this test. - ssa.SetNormalizeAnyForTesting(true) - defer ssa.SetNormalizeAnyForTesting(false) // Parse the source files. fset := token.NewFileSet() f, err := parser.ParseFile(fset, "hello.go", hello, parser.ParseComments) diff --git a/go/ssa/print.go b/go/ssa/print.go index c890d7ee5..ef32672a2 100644 --- a/go/ssa/print.go +++ b/go/ssa/print.go @@ -39,16 +39,8 @@ func relName(v Value, i Instruction) string { return v.Name() } -// normalizeAnyForTesting controls whether we replace occurrences of -// interface{} with any. It is only used for normalizing test output. -var normalizeAnyForTesting bool - func relType(t types.Type, from *types.Package) string { - s := types.TypeString(t, types.RelativeTo(from)) - if normalizeAnyForTesting { - s = strings.ReplaceAll(s, "interface{}", "any") - } - return s + return types.TypeString(t, types.RelativeTo(from)) } func relTerm(term *types.Term, from *types.Package) string { diff --git a/go/ssa/testhelper_test.go b/go/ssa/testhelper_test.go deleted file mode 100644 index 8d08bbb75..000000000 --- a/go/ssa/testhelper_test.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ssa - -// SetNormalizeAnyForTesting is exported here for external tests. -func SetNormalizeAnyForTesting(normalize bool) { - normalizeAnyForTesting = normalize -}