Skip to content

Commit e452d77

Browse files
committed
fix typo
1 parent eb46a00 commit e452d77

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
@@ -1531,7 +1531,7 @@ func TypeAssert[T any](v Value) (T, bool) {
15311531
if abi.TypeFor[T]() != v.typ() {
15321532
// TypeAssert[T] should work the same way as v.Interface().(T), thus we need
15331533
// to handle following case properly: TypeAssert[any](ValueOf(1)).
1534-
// Note that we will not hit here is such case: TypeAssert[any](ValueOf(any(1))).
1534+
// Note that we will not hit here is such case: TypeAssert[any](ValueOf(new(any)).Elem()).
15351535
if abi.TypeFor[T]().Kind() == abi.Interface {
15361536
v, ok := packEface(v).(T)
15371537
return v, ok

0 commit comments

Comments
 (0)