Created
October 18, 2019 02:30
-
-
Save ruimo/4bceebdc0e2b09ebf825f4a2de403116 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class Iterator<E extends Exception> { | |
abstract boolean hasNext() throws E; | |
} | |
class DumbIterator extends Iterator<RuntimeException> { | |
boolean hasNext() throws RuntimeException { | |
return true; | |
} | |
} | |
public class Test { | |
void foo(Iterator<RuntimeException> b) { | |
b.hasNext(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment