Skip to content

affected/package: internal compiler error: assertion failed #54165

New issue

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

Closed
CarstenLeue opened this issue Aug 1, 2022 · 2 comments
Closed

affected/package: internal compiler error: assertion failed #54165

CarstenLeue opened this issue Aug 1, 2022 · 2 comments

Comments

@CarstenLeue
Copy link

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

$ go version
go version go1.18.4 windows/amd64

Does this issue reproduce with the latest release?

yes

What did you do?

compile a small go file

package weird

type Weird[A any] interface {
}

type weird struct {
}

func MakeWeird[A any]() Weird[A] {
	return weird{}
}

func IsWeird[A any](data Weird[A]) bool {
	switch data.(type) {
	case weird:
		return true
	default:
		return false
	}
}

What did you expect to see?

successful compile

What did you see instead?

.\weird\weird.go:10:14: internal compiler error: assertion failed
@seankhliao
Copy link
Member

Doesn't repro on tip

@seankhliao
Copy link
Member

Duplicate of #53762

@seankhliao seankhliao marked this as a duplicate of #53762 Aug 1, 2022
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2022
@golang golang locked and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants