< prev index next >

test/langtools/tools/javac/lvti/harness/NonDenotableTest.java

Print this page
rev 52786 : 8210031: implementation for JVM Constants API


 106     void testAnonymousInterface() {
 107         @InferredType(ANON_RUNNABLE)
 108         var r = new Runnable() { public void run() { } };
 109         for (@InferredType(ANON_RUNNABLE) var s2 = new Runnable() { public void run() { } } ; ; ) { break; }
 110         for (@InferredType(ANON_RUNNABLE) var s2 : arrayOf(new Runnable() { public void run() { } })) { break; }
 111         for (@InferredType(ANON_RUNNABLE) var s2 : listOf(new Runnable() { public void run() { } })) { break; }
 112     }
 113 
 114     void testIntersection() {
 115         @InferredType(INT_INTEGER_DOUBLE)
 116         var c = choose(1, 1L);
 117         for (@InferredType(INT_INTEGER_DOUBLE) var s2 = choose(1, 1L) ; ;) { break; }
 118         for (@InferredType(INT_INTEGER_DOUBLE) var s2 : arrayOf(choose(1, 1L))) { break; }
 119         for (@InferredType(INT_INTEGER_DOUBLE) var s2 : listOf(choose(1, 1L))) { break; }
 120     }
 121 
 122     void testIntersection(Selector<?> s) {
 123         @InferredType(SEL_INT_ENUM_SEL)
 124         var c = s;
 125         for (@InferredType(SEL_INT_ENUM_SEL) var s2 = s ; ;) { break; }
 126         for (@InferredType(SEL_INT_ENUM_SEL) var s2 : arrayOf(s)) { break; }
 127         for (@InferredType(SEL_INT_ENUM_SEL) var s2 : listOf(s)) { break; }
 128     }
 129 
 130     List<? extends String> extString() { return null; }
 131     List<? super String> supString() { return null; }
 132     List<?> unbString() { return null; }
 133 
 134     List<? extends String>[] extStringArr() { return null; }
 135     List<? super String>[] supStringArr() { return null; }
 136     List<?>[] unbStringArr() { return null; }
 137 
 138     Iterable<? extends List<? extends String>> extStringIter() { return null; }
 139     Iterable<? extends List<? super String>> supStringIter() { return null; }
 140     Iterable<? extends List<?>> unbStringIter() { return null; }
 141 
 142     <Z extends Comparable<Z>> List<? extends Z> extFbound() { return null; }
 143     <Z extends Comparable<Z>> List<? super Z> supFbound() { return null; }
 144 
 145     <Z extends Comparable<Z>> List<? extends Z>[] extFboundArr() { return null; }
 146     <Z extends Comparable<Z>> List<? super Z>[] supFboundArr() { return null; }
 147 


 106     void testAnonymousInterface() {
 107         @InferredType(ANON_RUNNABLE)
 108         var r = new Runnable() { public void run() { } };
 109         for (@InferredType(ANON_RUNNABLE) var s2 = new Runnable() { public void run() { } } ; ; ) { break; }
 110         for (@InferredType(ANON_RUNNABLE) var s2 : arrayOf(new Runnable() { public void run() { } })) { break; }
 111         for (@InferredType(ANON_RUNNABLE) var s2 : listOf(new Runnable() { public void run() { } })) { break; }
 112     }
 113 
 114     void testIntersection() {
 115         @InferredType(INT_INTEGER_DOUBLE)
 116         var c = choose(1, 1L);
 117         for (@InferredType(INT_INTEGER_DOUBLE) var s2 = choose(1, 1L) ; ;) { break; }
 118         for (@InferredType(INT_INTEGER_DOUBLE) var s2 : arrayOf(choose(1, 1L))) { break; }
 119         for (@InferredType(INT_INTEGER_DOUBLE) var s2 : listOf(choose(1, 1L))) { break; }
 120     }
 121 
 122     void testIntersection(Selector<?> s) {
 123         @InferredType(SEL_INT_ENUM_SEL)
 124         var c = s;
 125         for (@InferredType(SEL_INT_ENUM_SEL) var s2 = s ; ;) { break; }


 126     }
 127 
 128     List<? extends String> extString() { return null; }
 129     List<? super String> supString() { return null; }
 130     List<?> unbString() { return null; }
 131 
 132     List<? extends String>[] extStringArr() { return null; }
 133     List<? super String>[] supStringArr() { return null; }
 134     List<?>[] unbStringArr() { return null; }
 135 
 136     Iterable<? extends List<? extends String>> extStringIter() { return null; }
 137     Iterable<? extends List<? super String>> supStringIter() { return null; }
 138     Iterable<? extends List<?>> unbStringIter() { return null; }
 139 
 140     <Z extends Comparable<Z>> List<? extends Z> extFbound() { return null; }
 141     <Z extends Comparable<Z>> List<? super Z> supFbound() { return null; }
 142 
 143     <Z extends Comparable<Z>> List<? extends Z>[] extFboundArr() { return null; }
 144     <Z extends Comparable<Z>> List<? super Z>[] supFboundArr() { return null; }
 145 
< prev index next >