Source file test/typeparam/mdempsky/2.go
1 // compile 2 3 // Copyright 2021 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 T[A, B, C any] int 10 11 func (T[A, B, C]) m(x int) { 12 if x <= 0 { 13 return 14 } 15 T[B, C, A](0).m(x - 1) 16 } 17 18 func main() { 19 T[int8, int16, int32](0).m(3) 20 } 21