Skip to content

cmd/compile: wrong type reported for generic cyclic interface #56046

Open
@griesemer

Description

package main

import "fmt"

type I[R any] interface{ m() R }
type J interface{ I[interface{ J }] }

func main() {
	fmt.Printf("%T\n", J.m)
}

reports the wrong type when run:

func(main.J) interface {}

(reported by @mdempsky)

Metadata

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions