go/format: any input to format.Source panics #42300
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
release-blocker
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
It does not reproduce with Go 1.15.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Pass any input to
format.Source
.https://play.golang.org/p/kZcA7s59sam
What did you expect to see?
Formatted output.
What did you see instead?
go/src/go/printer/nodes.go
Line 973 in 1af388f
This is reached because the type of
expr
is*ast.File
, which is not handled by the type switch.The text was updated successfully, but these errors were encountered: