Skip to content

cmd/compile: panic.Fatalf should not report "use of builtin panic not in function call" but instead "panic.Fatalf undefined (builtin panic has no field or method Fatalf)" #43285

@odeke-em

Description

@odeke-em

What version of Go are you using (go version)?

At pre-Go1.16 on tip 55b5801

Does this issue reproduce with the latest release?

Yes

What did you do?

, running this code https://play.golang.org/p/akRcEUKPrTA or inlined below

package main

func main() {
	panic.Fatalf("foo")
}

What did you expect to see?

panic.Fatalf undefined (builtin panic has no field or method Fatalf)

What did you see instead?

use of builtin panic not in function call

which would be similar to panic being present on a line but without any invocation https://play.golang.org/p/35T1E3Xttpp or

package main

func main() {
	panic
}
./prog.go:4:2: use of builtin panic not in function call

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions