Skip to content

Inline MethodOverloading case file #2241

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

Merged
merged 1 commit into from
Jan 12, 2020
Merged

Inline MethodOverloading case file #2241

merged 1 commit into from
Jan 12, 2020

Conversation

schalkms
Copy link
Member

No description provided.

@codecov-io
Copy link

codecov-io commented Jan 10, 2020

Codecov Report

Merging #2241 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2241      +/-   ##
============================================
+ Coverage     81.35%   81.37%   +0.02%     
- Complexity     2067     2073       +6     
============================================
  Files           341      343       +2     
  Lines          5968     5981      +13     
  Branches       1086     1086              
============================================
+ Hits           4855     4867      +12     
  Misses          532      532              
- Partials        581      582       +1
Impacted Files Coverage Δ Complexity Δ
...bosch/detekt/rules/providers/CoroutinesProvider.kt 100% <0%> (ø) 3% <0%> (?)
...ch/detekt/rules/coroutines/GlobalCoroutineUsage.kt 88.88% <0%> (ø) 3% <0%> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43a0982...1792311. Read the comment docs.

Copy link
Member

@BraisGabin BraisGabin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are losing the test of overloading in an inner class. I didn't check if it's really needed or not. I just point it out if it was removed by mistake. If it was intentional, all good.

Copy link
Member Author

@schalkms schalkms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are losing the test of overloading in an inner class.

The reason for that is described in #2247. I'll tackle this bug fix in another PR.
The test case was not catching that because it saw the function x() as a single overload (6 times). @BraisGabin

class OverloadedMethods {
  fun x() {}
  fun x(i: Int) {}
  fun x(i: Int, j: Int) {}

  private class InnerClass {
    // if these functions were named `y()` instead the bug would have been caught.
    fun x() {}
    fun x(i: Int) {}
    fun x(i: Int, j: Int) {}
  }
}

@3flex 3flex merged commit de61213 into detekt:master Jan 12, 2020
@arturbosch arturbosch added this to the 1.4.0 milestone Jan 12, 2020
@schalkms schalkms deleted the inline-case-file_MethodOverloading branch January 12, 2020 19:51
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.

5 participants