blob: d8fa107cc8725ba40647f8797bd1c031d858ca1c [file] [view]
---
title: InvalidCopy
layout: article
---
<!-- Copyright 2023 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. -->
<!-- Code generated by generrordocs.go; DO NOT EDIT. -->
```
InvalidCopy occurs when the arguments are not of slice type or do not
have compatible type.
See https://golang.org/ref/spec#Appending_and_copying_slices for more
information on the type requirements for the copy built-in.
Example:
func f() {
var x []int
y := []int64{1,2,3}
copy(x, y)
}
```