And one more thing. How to throw a generic type: `...
# getting-started
j
And one more thing. How to throw a generic type:
public <E extends Throwable> void foo() throws E
k
jschneider: Just leave out the throw clause, that isn't needed in Kotlin. I also can't think of a single example where throwing a generic type would be valid, can you give one? How would I catch it?
❤️ 1
j
In Java throwing generic types works just fine. This helps a lot with visitors. So they can throw for example an IOException. And I don't have to add multiple try/catch
And I need that throws declaration since I want to be able to extend my kotlin class in Java where the throws declaration is necessary (at least I think)