blob: 81d8aee379d8f5693612fc02e351d9dd3365a4a8 [file] [log] [blame]
// { dg-do compile }
// { dg-options "-fgo-debug-optimization" }
package p
func F(x []byte, y string) bool {
return string(x) == y // { dg-error "no copy string\\(\\\[\\\]byte\\)" }
}
func BytesEqual(x, y []byte) bool {
return string(x) == // { dg-error "no copy string\\(\\\[\\\]byte\\)" }
string(y) // { dg-error "no copy string\\(\\\[\\\]byte\\)" }
}