-
Notifications
You must be signed in to change notification settings - Fork 19k
cmd/compile: type inference should look inside type parameters #49575
Copy link
Copy link
Closed
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.TypeInferenceIssue is related to generic type inferenceIssue is related to generic type inferencegenericsIssue is related to genericsIssue is related to generics
Milestone
Metadata
Metadata
Assignees
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.TypeInferenceIssue is related to generic type inferenceIssue is related to generic type inferencegenericsIssue is related to genericsIssue is related to generics
This is extracted from issue #49441.
For
we currently get an error (at the wrong line, see issue #45985 for that).
But the question arises, should we be able to infer the type arguments in this case?
@hanchaoqun has provided CL 362776 (thanks!) that addresses this and would make this code work.
Need to decide a) if we want this; and b) is the CL correct (are there unintended consequences).
cc @ianlancetaylor for thoughts on this.