testenv.MustHaveGoBuild(t)
testfiles := map[string][]string{
- "exports.go": {"go/ast", "go/token"},
+ "exports.go": {"go/ast"},
"generics.go": nil,
}
- if true /* was goexperiment.Unified */ {
- // TODO(mdempsky): Fix test below to flatten the transitive
- // Package.Imports graph. Unified IR is more precise about
- // recreating the package import graph.
- testfiles["exports.go"] = []string{"go/ast"}
- }
for testfile, wantImports := range testfiles {
tmpdir := mktmpdir(t)
// The unified IR importer always sets interface method receiver
// parameters to point to the Interface type, rather than the Named.
// See #49906.
- //
- // TODO(mdempsky): This is only true for the types2 importer. For
- // the go/types importer, we duplicate the Interface and rewrite its
- // receiver methods to match historical behavior.
- var want types2.Type = named
- if true /* was goexperiment.Unified */ {
- want = iface
- }
+ var want types2.Type = iface
// check explicitly declared methods
for i := 0; i < iface.NumExplicitMethods(); i++ {
t.Skip("skipped for many architectures")
case "arm64", "amd64": // register ABI
- fn := "(*List[go.shape.int_0]).PushBack"
- if true /* was buildcfg.Experiment.Unified */ {
- // Unified mangles differently
- fn = "(*List[go.shape.int]).PushBack"
- }
+ fn := "(*List[go.shape.int]).PushBack"
testDebugLines(t, "-N -l", "pushback.go", fn, []int{17, 18, 19, 20, 21, 22, 24}, true)
}
}
t.Skip("skipped for many architectures")
case "arm64", "amd64": // register ABI
- fn := "G[go.shape.int_0]"
- if true /* was buildcfg.Experiment.Unified */ {
- // Unified mangles differently
- fn = "G[go.shape.int]"
- }
+ fn := "G[go.shape.int]"
testDebugLines(t, "-N -l", "convertline.go", fn, []int{9, 10, 11}, true)
}
}