go/types, types2: better error message for failing inference for arguments using type parameters #49800
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Using compiler from tip:
Calling a generic function from another using the same type parameters causes inference to fail. The compiler points to the function being called, not the location of the call:
Returns:
Ideally type checking should be able to infer the type parameters since they are identical, but I'm not sure if this is intended for Go 1.18.
Alternatively, there should to be a clearer error message pointing to the call location, not the callee.
I couldn't see a similar open bug, but this is complicated enough (for me) I might have missed it.
Cc @griesemer @findleyr
The text was updated successfully, but these errors were encountered: