author | jjg |
Mon, 18 Apr 2016 18:41:38 -0700 | |
changeset 37636 | 6c6e6e25189d |
parent 29553 | 716d47f5a45e |
permissions | -rw-r--r-- |
29553 | 1 |
/* |
2 |
* @test /nodynamiccopyright/ |
|
3 |
* @bug 8074381 |
|
4 |
* @summary java.lang.AssertionError during compiling |
|
5 |
* @compile/fail/ref=T8074381a.out -XDrawDiagnostics T8074381a.java |
|
6 |
*/ |
|
7 |
class T8074381a { |
|
8 |
interface Sup<X> { |
|
9 |
boolean m(X x); |
|
10 |
} |
|
11 |
||
12 |
interface Sub<X> extends Sup<String> { |
|
13 |
boolean m(String s); |
|
14 |
} |
|
15 |
||
37636
6c6e6e25189d
8154504: javac tests fail after JDK API is deprecated
jjg
parents:
29553
diff
changeset
|
16 |
@SuppressWarnings("deprecation") |
29553 | 17 |
void testRaw() { |
18 |
Sub s1 = c -> true; |
|
19 |
Sub s2 = Boolean::new; |
|
20 |
Sub s3 = new Sub() { |
|
21 |
@Override |
|
22 |
public boolean m(String o) { return true; } |
|
23 |
}; |
|
24 |
} |
|
25 |
||
37636
6c6e6e25189d
8154504: javac tests fail after JDK API is deprecated
jjg
parents:
29553
diff
changeset
|
26 |
@SuppressWarnings("deprecation") |
29553 | 27 |
void testNonRaw() { |
28 |
Sub<Integer> s1 = c -> true; |
|
29 |
Sub<Integer> s2 = Boolean::new; |
|
30 |
Sub<Integer> s3 = new Sub<Integer>() { |
|
31 |
@Override |
|
32 |
public boolean m(String o) { return true; } |
|
33 |
}; |
|
34 |
} |
|
35 |
} |