Input:
package pkg
func foo[T ~string | ~[]byte]() {
var _ T = T("")
}
Output:
./baz.go:4:14: cannot convert "" (untyped string value) to type T:
cannot convert "" (untyped string constant) to []byte (in T)
I expected this conversion to work. If it isn't supposed to work, then the error message is confusing.
/cc @griesemer
Input:
Output:
I expected this conversion to work. If it isn't supposed to work, then the error message is confusing.
/cc @griesemer