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

findOverridee might throw exception #150

Closed
yigit opened this issue Nov 9, 2020 · 0 comments · Fixed by #151
Closed

findOverridee might throw exception #150

yigit opened this issue Nov 9, 2020 · 0 comments · Fixed by #151
Assignees
Labels
bug Something isn't working P1 major features or blocking bugs
Milestone

Comments

@yigit
Copy link
Collaborator

yigit commented Nov 9, 2020

For the following code:

class Foo {
    fun instanceMethod(): String =TODO()
    companion object {
        fun companionMethod(): String =TODO()
    }
}

calling findOverridee on an instance of companionMethod / instanceMethod throws java.util.NoSuchElementException: Collection contains no element matching the predicate..
Since the method is nullable, i think it is better to return null instead of throwing?

@neetopia neetopia self-assigned this Nov 10, 2020
@ting-yuan ting-yuan added this to the 2020Q4 milestone Nov 20, 2020
@ting-yuan ting-yuan added bug Something isn't working P1 major features or blocking bugs labels Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 major features or blocking bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants