go/types, types2: nonsensical error message and position when type argument does not match constraint #45985
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
When a function is instantiated with type arguments that don't satisfy its type parameter constraints, the error message go/types produces references the type parameter, rather than the type argument, and is also located on the parameter.
Example (this error check test currently passes in go/types):
In this case, the actual error is that
app
is instantiated withint
rather than[]int
.Confirmed that this also affects types2.
CC @griesemer
The text was updated successfully, but these errors were encountered: