Skip to content

Commit 31a7a18

Browse files
committed
fix typo
1 parent d50547d commit 31a7a18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/reflect/value.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ func TypeAssert[T any](v Value) (T, bool) {
15341534
if abi.TypeFor[T]() != v.typ() {
15351535
// TypeAssert[T] should work the same way as v.Interface().(T), thus we need
15361536
// to handle following case properly: TypeAssert[any](ValueOf(1)).
1537-
// Note that we will not hit here is such case: TypeAssert[any](ValueOf(any(1))).
1537+
// Note that we will not hit here is such case: TypeAssert[any](ValueOf(new(any)).Elem()).
15381538
if abi.TypeFor[T]().Kind() == abi.Interface {
15391539
v, ok := packEface(v).(T)
15401540
return v, ok

0 commit comments

Comments
 (0)