We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproducer:
const src = `package A type ( A0 = A A = A ) ` func run() error { fset := token.NewFileSet() f, err := parser.ParseFile(fset, "test.go", src, parser.SkipObjectResolution) if err != nil { return err } _, err = (&types.Config{ Error: func(err error) {}, }).Check("test", fset, []*ast.File{f}, &types.Info{}) return err }
$ go run . panic: t.fromRHS = test.A, typ = invalid type [recovered] panic: t.fromRHS = test.A, typ = invalid type goroutine 1 [running]: go/types.(*Checker).handleBailout(0xc000007500, 0xc00012be20) /usr/lib/go/src/go/types/check.go:404 +0x88 panic({0x584240?, 0xc000014210?}) /usr/lib/go/src/runtime/panic.go:785 +0x132 go/types.setDefType(0xc000007500?, {0x5fbce0, 0x6f4720}) /usr/lib/go/src/go/types/typexpr.go:422 +0x294 go/types.(*Checker).typInternal(0xc000007500, {0x5fbff8, 0xc0000780a0}, 0xc00010f3b0) /usr/lib/go/src/go/types/typexpr.go:267 +0x659 go/types.(*Checker).definedType(0xc000007500, {0x5fbff8, 0xc0000780a0}, 0x6f4720?) /usr/lib/go/src/go/types/typexpr.go:201 +0x2f go/types.(*Checker).typeDecl(0xc000007500, 0xc00010f3b0, 0xc000100280, 0x0) /usr/lib/go/src/go/types/decl.go:610 +0x8cd go/types.(*Checker).objDecl(0xc000007500, {0x5fe198, 0xc00010f3b0}, 0x0) /usr/lib/go/src/go/types/decl.go:191 +0xa3f go/types.(*Checker).packageObjects(0xc000007500) /usr/lib/go/src/go/types/resolver.go:710 +0x408 go/types.(*Checker).checkFiles(0xc000007500, {0xc000106ef0, 0x1, 0x1}) /usr/lib/go/src/go/types/check.go:459 +0x15a go/types.(*Checker).Files(0x5b6095?, {0xc000106ef0?, 0xc0000326c0?, 0x0?}) /usr/lib/go/src/go/types/check.go:422 +0x75 go/types.(*Config).Check(0xc00011c0e0, {0x5b6095?, 0x7?}, 0xc000100240, {0xc000106ef0, 0x1, 0x1}, 0xc000032600) /usr/lib/go/src/go/types/api.go:476 +0x79 main.run() /tmp/aa/main.go:32 +0xc5 main.main() /tmp/aa/main.go:12 +0x13 exit status 2
CC @adonovan @findleyr @griesemer
The text was updated successfully, but these errors were encountered:
This was found by a fuzzer.
Sorry, something went wrong.
Thank you. I believe this should also block the 1.24 release.
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Change https://go.dev/cl/643255 mentions this issue: go/types, types2: remove superfluous assertion (fix build)
go/types, types2: remove superfluous assertion (fix build)
80bf7d8
griesemer
No branches or pull requests
Reproducer:
CC @adonovan @findleyr @griesemer
The text was updated successfully, but these errors were encountered: