cmd/compile: function parameter order-dependence in type inference #60946
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
release-blocker
Milestone
Type inference is supposed to be function parameter order independent. Here's a counter-example (playground):
Analysis: In the call
g(t1, t2, t)
, the first two arguments (t1
,t2
) have types that don't match and unification fails. In the callg(t, t1, t2)
, the argumentt
subsumes the other types and it works out.This issue also arises if the interface
T
were an unnamed interface.Tentatively marking as a release blocker.
The text was updated successfully, but these errors were encountered: