Skip to content
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

KT-4854: Inspection to detect redundant type arguments #460

Merged

Conversation

wutalman
Copy link

inspection to report on function calls where the type arguments can be automatically inferred
http://youtrack.jetbrains.com/issue/KT-4854

@wutalman
Copy link
Author

I had a lot of problems with some of my tests failing in a seemingly random pattern, took me a lot of time to realize that it was because I had functions with a similar signature in many of my tests, and for some reason it caused conflicts, I think the testing infrastructure either uses too wide of a scope (looking at more than just 1 file) or does not clean up the context between each inspection test, because basically if i have this situation:
fun foo(t: T, v: T) in test file 1
fun foo<T, V>(t: T, v: V) in test file 2
and then i call foo("x", "y") from file 2 it will not be able to resolve the function (ambiguous call).

right now i solved it for my specific case by giving a unique name to the functions in each of my tests

@NataliaUkhorskaya NataliaUkhorskaya self-assigned this Apr 25, 2014
@NataliaUkhorskaya
Copy link
Contributor

Hi,
I've fixed the problem you mentioned in master, so you should update your branch on master and remove all changes from test files.
Feel free to ask us any questions when you have such problems.
Thank you, i'll wait for update.

@wutalman
Copy link
Author

wutalman commented May 4, 2014

I've reverted the changes to the tests in the commit and it seems to work fine now, I couldn't run all tests though because since the last pull I have an issue where hundreds of tests fail.

but the inspection tests now work with the old test files

@NataliaUkhorskaya NataliaUkhorskaya merged commit ab2ca53 into JetBrains:master May 5, 2014
@NataliaUkhorskaya
Copy link
Contributor

This time I fixed small errors by myself, but next time, please, review your changes more carefully before submitting a pull request. Thank you!

See those commits:
020c127
13f7ca5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants