3 // Copyright 2017 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Verify that copy arguments requirements are enforced by the
15 sf := make([]float64, 8)
17 _ = copy() // ERROR "missing arguments"
18 _ = copy(1, 2, 3) // ERROR "too many arguments"
20 _ = copy(si, "hi") // ERROR "have different element types.*int.*string"
21 _ = copy(si, sf) // ERROR "have different element types.*int.*float64"
23 _ = copy(1, 2) // ERROR "must be slices; have int, int"
24 _ = copy(1, si) // ERROR "first argument to copy should be"
25 _ = copy(si, 2) // ERROR "second argument to copy should be"