mirror of
https://github.com/golang/go
synced 2024-11-06 14:26:22 -07:00
20 lines
295 B
Go
20 lines
295 B
Go
|
// 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
|
||
|
|
||
|
func f[T int](t T) {
|
||
|
for true {
|
||
|
func() {
|
||
|
t = func() T { return t }()
|
||
|
}()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
f(0)
|
||
|
}
|