aboutsummaryrefslogtreecommitdiff
path: root/test/typeparam/issue47797.go
blob: 3e80d3c7a910b47c8bb9b1ba6050ec8a767341c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// compile -G=3

// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package p

type Foo[T any] struct {
        Val T
}

func (f Foo[T]) Bat() {}

type Bar struct {
        Foo[int]
}

func foo() {
        var b Bar
        b.Bat()
}