Debian Codegraph @

test/fixedbugs/issue53982.go

raw
1 // build
2
3 // Copyright 2022 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 package main
8
9 type S[K, V any] struct {
10 E[V]
11 }
12
13 type E[K any] struct{}
14
15 func (e E[K]) M() E[K] {
16 return e
17 }
18
19 func G[K, V any](V) {
20 _ = (*S[K, V]).M
21 }
22
23 func main() {
24 G[*int](new(int))
25 }