FileTraverser has a poor API for use by Kotlin
See original GitHub issueOverload resolution ambiguity. All these functions match.
public abstract fun breadthFirst(p0: Path!): (Mutable)Iterable<Path!>! defined in com.google.common.graph.Traverser
public abstract fun breadthFirst(p0: (Mutable)Iterable<Path!>!): (Mutable)Iterable<Path!>! defined in com.google.common.graph.Traverser
Kotlin cannot distinguish between Path and Iterable<Path> making use of this function impossible by Kotlin code.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Kotlin documentation of API - Support
I have listened from many developers , that the APIs documentation of Kotlin is poor in STYLE. Like for example if I want...
Read more >Public API challenges in Kotlin - Jake Wharton
An overused example in every intro-to-Kotlin talk or blog post is comparing a Java “POJO” to a Kotlin data class . Here's yet...
Read more >Retrofit2 Upload Using RequestBody returns 400 Bad ...
I've updated the content of the question. The Retrofit API class used in my app contains the Request Params which maps to my...
Read more >GoodReads API from Android with Kotlin | by Andrey Suvorov
I love reading books. I also love to track what I've read. Goodreads is a probably world's largest community of book lovers and...
Read more >Developing RESTful APIs with Kotlin - Auth0
Let's build and secure a RESTful API with Kotlin and Spring Boot. ... If you have never used Kotlin before, you can still...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It compiles just fine.
It runs just fine as well.
It doesn’t show well from the snippet but what I pasted was the error the kotlin compiler was giving me. It cannot distinguish between Iterable<Path> and Path since Path also implements the Iterable Interface.
Interestingly, I got around this by doing:
If I do the path without a collection
depthFirstPreOrder(root)
I get the failure as mentioned above.