Skip to content
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

cmd/compile: internal compiler error: assertion failed #53406

Closed
wdvxdr1123 opened this issue Jun 16, 2022 · 3 comments
Closed

cmd/compile: internal compiler error: assertion failed #53406

wdvxdr1123 opened this issue Jun 16, 2022 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.

Comments

@wdvxdr1123
Copy link
Contributor

I also got the same error. MWE of the code I was working with:

package main

import "fmt"

type Interface[K any] interface {
	Name() string
}

type interfaceImpl[K any] struct {
	name string
}

func (i interfaceImpl[K]) Name() string {
	return i.name
}

type Type[T any, K any] struct {
	interfaceImpl[K]
}

func main() {
	a := Type[int, int]{
		interfaceImpl[int]{name: "hello"},
	}
	printName(a)
}

func printName[T any](k Type[T, int]) {
	fmt.Println(k.Name())
}

Originally posted by @arvidfm in #53254 (comment)

@gopherbot
Copy link

Change https://go.dev/cl/412614 mentions this issue: cmd/compile: fix assert condition in generic method call

@thanm thanm added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 17, 2022
@wdvxdr1123
Copy link
Contributor Author

@gopherbot please open a backport issue to 1.18.

@gopherbot
Copy link

Backport issue(s) opened: #53274 (for 1.18).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

jproberts pushed a commit to jproberts/go that referenced this issue Aug 10, 2022
Fixes golang#53406.

Change-Id: If7ae39ec1042a792d82a0a2de96d168c22d8ab71
Reviewed-on: https://go-review.googlesource.com/c/go/+/412614
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Auto-Submit: Alex Rakoczy <alex@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
@golang golang locked and limited conversation to collaborators Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants