mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
[tests] prepares Java tests for the language level raise
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class Test {
|
||||
interface F<T extends Throwable> {
|
||||
void _(T t) throws T;
|
||||
void m(T t) throws T;
|
||||
}
|
||||
<K extends Throwable> void foo(F<K> f) throws K { }
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@ import java.io.IOException;
|
||||
|
||||
class Test {
|
||||
interface F<T extends Throwable> {
|
||||
void _() throws T;
|
||||
void m() throws T;
|
||||
}
|
||||
|
||||
|
||||
void m1() { }
|
||||
void m2() throws NullPointerException{ }
|
||||
void m3() throws IOException { }
|
||||
<K extends Throwable> void foo(F<K> f) throws K { }
|
||||
|
||||
|
||||
{
|
||||
foo(()->{});
|
||||
foo(()->{throw new NullPointerException();});
|
||||
@@ -18,5 +18,5 @@ class Test {
|
||||
foo(this::m2);
|
||||
<error descr="Unhandled exception: java.io.IOException">foo(this::m3);</error>
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
class Test {
|
||||
interface F<T extends ClassNotFoundException> {
|
||||
void _() throws T;
|
||||
void m() throws T;
|
||||
}
|
||||
<K extends ClassNotFoundException> void foo(F<K> f) throws K { }
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
class Test {
|
||||
|
||||
interface F<T extends Throwable> {
|
||||
void _() throws T;
|
||||
void m() throws T;
|
||||
}
|
||||
|
||||
void m1() { }
|
||||
void m2() throws ClassNotFoundException { }
|
||||
void m3() throws Exception { }
|
||||
|
||||
|
||||
<K extends Throwable> void foo1(F<K> f) throws K { }
|
||||
<K extends ClassNotFoundException> void foo2(F<K> f) throws K { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user