Skip to content

cmd/compile: crash when reporting invalid type alias declaration #48301

Closed
@griesemer

Description

@griesemer

Compiling

package p

func _() {
	type T = T
}

using the old typechecker (-G=0) crashes when reporting an error:

$ go tool compile -G=0 /Users/gri/tmp/x.go
/Users/gri/tmp/x.go:4:7: invalid recursive type alias %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)
        /Users/gri/tmp/x.go:4:7: %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference) uses %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions