t.Fatal(err)
}
- skip := map[string]string{
- "equal.go": "inconsistent embedded sorting", // TODO(rfindley): investigate this.
- "nested.go": "fails to compile", // TODO(rfindley): investigate this.
- "issue50417.go": "inconsistent interface member sorting",
- "issue53419.go": "fails to compile",
- "issue53477.go": "fails to compile",
- "issue55101.go": "fails to compile",
+ var skip map[string]string
+ if !goexperiment.Unified {
+ // The Go 1.18 frontend still fails several cases.
+ skip = map[string]string{
+ "equal.go": "inconsistent embedded sorting", // TODO(rfindley): investigate this.
+ "nested.go": "fails to compile", // TODO(rfindley): investigate this.
+ "issue55101.go": "fails to compile",
+ }
}
for _, entry := range list {
idx pkgbits.Index
derived bool
}
+
+// See cmd/compile/internal/types.SplitVargenSuffix.
+func splitVargenSuffix(name string) (base, suffix string) {
+ i := len(name)
+ for i > 0 && name[i-1] >= '0' && name[i-1] <= '9' {
+ i--
+ }
+ const dot = "ยท"
+ if i >= len(dot) && name[i-len(dot):i] == dot {
+ i -= len(dot)
+ return name[:i], name[i:]
+ }
+ return name, ""
+}
return objPkg, objName
}
+ // Ignore local types promoted to global scope (#55110).
+ if _, suffix := splitVargenSuffix(objName); suffix != "" {
+ return objPkg, objName
+ }
+
if objPkg.Scope().Lookup(objName) == nil {
dict := pr.objDictIdx(idx)