import (
"bytes"
"fmt"
- "internal/godebug"
"internal/testenv"
"os"
"os/exec"
want := types.ObjectString(checkedObj, types.RelativeTo(checked))
want = sanitizeObjectString(want)
- // TODO(golang/go#66859): investigate and reenable these tests,
- // which fail with gotypesalias=1, soon to be the default.
- if godebug.New("gotypesalias").Value() != "0" {
- symbol := name + " in " + filepath.Base(filename)
- switch symbol {
- case "Eint2 in struct.go", "A in issue50259.go":
- t.Skipf("%s requires gotypesalias=1", symbol)
- }
- }
-
if got != want {
t.Errorf("imported %q as %q, want %q", name, got, want)
}
}
}
- if check.conf._EnableAlias {
+ if false && check.conf._EnableAlias {
// With Alias nodes we can process declarations in any order.
+ //
+ // TODO(adonovan): unfortunately, Alias nodes
+ // (GODEBUG=gotypesalias=1) don't entirely resolve
+ // problems with cycles. For example, in
+ // GOROOT/test/typeparam/issue50259.go,
+ //
+ // type T[_ any] struct{}
+ // type A T[B]
+ // type B = T[A]
+ //
+ // TypeName A has Type Named during checking, but by
+ // the time the unified export data is written out,
+ // its Type is Invalid.
+ //
+ // Investigate and reenable this branch.
for _, obj := range objList {
check.objDecl(obj, nil)
}