diff options
Diffstat (limited to 'test/typeparam/issue52241.go')
-rw-r--r-- | test/typeparam/issue52241.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/typeparam/issue52241.go b/test/typeparam/issue52241.go new file mode 100644 index 0000000..4feb97e --- /dev/null +++ b/test/typeparam/issue52241.go @@ -0,0 +1,22 @@ +// compile + +// Copyright 2022 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 main + +type Collector[T any] struct { +} + +func (c *Collector[T]) Collect() { +} + +func TestInOrderIntTree() { + collector := Collector[int]{} + _ = collector.Collect +} + +func main() { + TestInOrderIntTree() +} |