Source file test/fixedbugs/issue80450b.dir/b.go
1 // Copyright 2026 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package workflow 6 7 import "reflect" 8 9 type Value interface { 10 value() reflect.Value 11 } 12 13 func Const[T any](value T) Value { 14 return &constant[T]{value} 15 } 16 17 type constant[T any] struct { 18 v T 19 } 20 21 func (c *constant[T]) value() reflect.Value { 22 return reflect.ValueOf(c.v) 23 } 24