-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: genericmethodinvoker now correctly handles generic methods with overloads #6844
Merged
ReubenBond
merged 2 commits into
dotnet:master
from
oising:feature/genericmethodinvoker-overloads
Dec 16, 2020
Merged
fix: genericmethodinvoker now correctly handles generic methods with overloads #6844
ReubenBond
merged 2 commits into
dotnet:master
from
oising:feature/genericmethodinvoker-overloads
Dec 16, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There's room to reduce allocations by killing off LINQ usage. I may add another commit this weekend. |
Oh, interesting -- it seems I triggered two failures in two other generic method tests. I wonder if I broke something, or revealed more bugs... edit: I'm dumb. My bugs. I found my bugs. |
clean up old experiments extend tests; tweaks update grain reference generator to pack argument types (as well as values) into args for invoker rewrite generic method invoker's routine to find appropriate generic overloads using types instead of values update tests for genericmethodinvoker
oising
force-pushed
the
feature/genericmethodinvoker-overloads
branch
from
December 6, 2020 07:55
d0345db
to
44f56f1
Compare
oising
commented
Dec 6, 2020
ReubenBond
approved these changes
Dec 16, 2020
Great work, thank you! |
ReubenBond
added a commit
to ReubenBond/orleans
that referenced
this pull request
Apr 7, 2021
…loads (dotnet#6844) * Fix GenericMethodInvoker to handle overloaded methods. Add tests. Co-authored-by: Oisin Grehan <oisin.grehan@hiloenergie.com>
ReubenBond
added a commit
to ReubenBond/orleans
that referenced
this pull request
Jun 18, 2021
…loads (dotnet#6844) * Fix GenericMethodInvoker to handle overloaded methods. Add tests. Co-authored-by: Oisin Grehan <oisin.grehan@hiloenergie.com>
oising
added a commit
to oising/orleans
that referenced
this pull request
Aug 4, 2021
ReubenBond
pushed a commit
that referenced
this pull request
Aug 5, 2021
Co-authored-by: Oisin Grehan <oisin.grehan@hiloenergie.com>
ReubenBond
pushed a commit
that referenced
this pull request
Aug 11, 2021
…#6844) (#7190) * backport PR #6844 to 3.5.0: generic overloads selection bugfix * fixed nuget reference (constant version) for codeanalysis to build var * add failing test case * Implement support for ValueTask and ValueTask<T> grain return types for generic grain methods. * address Reuben's comment * address Reuben's comment, again :) Co-authored-by: Oisin Grehan <oisin.grehan@hiloenergie.com>
benjaminpetit
pushed a commit
to benjaminpetit/orleans
that referenced
this pull request
Sep 22, 2021
…dotnet#6844) (dotnet#7190) * backport PR dotnet#6844 to 3.5.0: generic overloads selection bugfix * fixed nuget reference (constant version) for codeanalysis to build var * add failing test case * Implement support for ValueTask and ValueTask<T> grain return types for generic grain methods. * address Reuben's comment * address Reuben's comment, again :) Co-authored-by: Oisin Grehan <oisin.grehan@hiloenergie.com>
ReubenBond
pushed a commit
that referenced
this pull request
Sep 22, 2021
Co-authored-by: Oisin Grehan <oisin.grehan@hiloenergie.com>
ReubenBond
pushed a commit
that referenced
this pull request
Sep 22, 2021
…#6844) (#7190) * backport PR #6844 to 3.5.0: generic overloads selection bugfix * fixed nuget reference (constant version) for codeanalysis to build var * add failing test case * Implement support for ValueTask and ValueTask<T> grain return types for generic grain methods. * address Reuben's comment * address Reuben's comment, again :) Co-authored-by: Oisin Grehan <oisin.grehan@hiloenergie.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
added code to select correct overload for generic methods; previously was always selecting first overload, regardless of parameters provided.
invokers cache now caches with a compound key of generic type parameter(s) + argument type(s). Before it was caching by type parameter(s) only, which would collapse all overloads sharing type parameters into one entry, e.g.
If these two methods were invoked with the same
T
, then the callsite cache would only ever invoke the first match, even if two params were passed.improve error message on failure to find suitable overload (it now shows the actual type parameters, and not just the arity)
added tests for invoker
Closes #6801