diff --git a/src/net/http/transfer_test.go b/src/net/http/transfer_test.go index 20cc7b5d50b..3f9ebdea7bb 100644 --- a/src/net/http/transfer_test.go +++ b/src/net/http/transfer_test.go @@ -112,8 +112,8 @@ func (w *mockTransferWriter) Write(p []byte) (int, error) { } func TestTransferWriterWriteBodyReaderTypes(t *testing.T) { - fileType := reflect.TypeOf(&os.File{}) - bufferType := reflect.TypeOf(&bytes.Buffer{}) + fileType := reflect.TypeFor[*os.File]() + bufferType := reflect.TypeFor[*bytes.Buffer]() nBytes := int64(1 << 10) newFileFunc := func() (r io.Reader, done func(), err error) {