Change-Id: Ie0af0ff135ac14d35476d738a16f04e9c3eebcd2
Reviewed-on: https://go-review.googlesource.com/c/go/+/502475
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Chressie Himpel <chressie@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
</li>
<li><!-- https://go.dev/issue/59750 -->
Type inference is now precise when matching corresponding types in assignments:
- component types (such as the the elements of slices, or the parameter types in function signatures)
+ component types (such as the elements of slices, or the parameter types in function signatures)
must be identical (given suitable type arguments) to match, otherwise inference fails.
This change produces more accurate error messages:
where in the past type inference may have succeeded incorrectly and lead to an invalid assignment,