-
Notifications
You must be signed in to change notification settings - Fork 300
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
"Inline Method" fails with type params #4167
Comments
@bwilkerson I'm investigating why the Inline Method refactor doesn't work correctly when the method has type args ( The code compares
I'm not sure whether a) my code is bad and something is not resolving correctly, b) this is a bug and that parameter declaration should be non-synthetic and match, or c) this is expected and the refactor should match the parameters in a different way (for example comparing the names?). Some tests and comments are here if it helps: |
Yes, we have issues around the way generic method invocation resolution is implemented. IIRC we get the generic Maybe we should do what we did for This will not fix this immediate issue though. We probably should instantiate corresponding |
I don't understand this well enough to know what the scale of that work is - is it significant/breaking? (and/or something I can do without significant hand-holding?). Out of curiosity, I did try changing it to just compare based on name, and it passes the tests: I can't think of any reasons why this wouldn't be sound, but I'm not certain there aren't any :-) |
Yes, this looks as a relatively big piece of work. Your solution looks good, I left a couple of comments. |
Fixed by dart-lang/sdk@813aa69. |
Trying to inline this method results in "No argument for the parameter "a"., type: 1". Removing
<T>
"fixes" it.The text was updated successfully, but these errors were encountered: