This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
Fix signature instantiation for generic method on generic types - #1077
Merged
MichalStrehovsky merged 1 commit intoApr 4, 2016
Merged
Conversation
Member
Author
|
(This actually makes me wonder why we're trying to handle everything in |
Member
|
I think to fix this bug, you just need to change |
Member
|
...and force the GetInstantiatedMethod at the end if necessary. We should not need to do two GetInstantiatedMethod calls. |
MichalStrehovsky
force-pushed
the
instantiateSignature
branch
from
April 4, 2016 16:55
f4ac265 to
e389355
Compare
Member
Author
|
Fixed.
OK, I see the answer to this is "perf" :) |
| { | ||
| method = Context.GetMethodForInstantiatedType(method.GetTypicalMethodDefinition(), (InstantiatedType)instantiatedOwningType); | ||
| if (clone == null && HasInstantiation) | ||
| return Context.GetInstantiatedMethod(method, Instantiation); |
Member
There was a problem hiding this comment.
Nit - this could be
if (clone == null && instantiation.Length != 0)
return Context.GetInstantiatedMethod(method, instantiation);
Member
|
LGTM |
If `this` is something like `Foo<!0>.Generic<Bar<!0>>` the call to `GetTypicalMethodDefinition` would strip the method instantiation away and we would lose a piece of the context because `method` is now `Foo<X>.Generic`.
MichalStrehovsky
force-pushed
the
instantiateSignature
branch
from
April 4, 2016 17:11
e389355 to
e19cf74
Compare
This file contains hidden or 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
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.
If
thisis something likeFoo<!0>.Generic<Bar<!0>>the call toGetTypicalMethodDefinitionwould strip the method instantiation awayand we would lose a piece of the context because
methodis nowFoo<X>.Generic.