package p
func f[_ any]() {}
func _() {
f()
}
produces the error
but blank type parameters can't be used and thus it doesn't matter what their corresponding argument is if the constraint is any (any type will satisfy that constraint). If the constraint is not any we should still infer the type argument so we can verify constraint satisfaction.
Maybe we shouldn't report an error in this case. Or maybe this is so esoteric that is doesn't matter. Filing this issue so we document decision (and perhaps implement it).
cc: @ianlancetaylor @findleyr for input
produces the error
but blank type parameters can't be used and thus it doesn't matter what their corresponding argument is if the constraint is
any(any type will satisfy that constraint). If the constraint is notanywe should still infer the type argument so we can verify constraint satisfaction.Maybe we shouldn't report an error in this case. Or maybe this is so esoteric that is doesn't matter. Filing this issue so we document decision (and perhaps implement it).
cc: @ianlancetaylor @findleyr for input