< prev index next >

test/langtools/tools/javac/generics/inference/8176534/TestUncheckedCalls.java

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


 204             return typeVarsKinds[index];
 205         }
 206     }
 207 
 208     CallKind callKind;
 209     InputExpressionKind inputExpressionKind;
 210     TypeKind[] returnKinds = new TypeKind[2];
 211     TypeKind[] argumentKinds = new TypeKind[2];
 212     TypeVarsKind[] typeVarsKinds = new TypeVarsKind[2];
 213     Decl[] decls = new Decl[2];
 214 
 215     boolean arityFilter() {
 216         return (callKind == CallKind.M || !decls[1].hasKind(DeclKind.NONE)) &&
 217                 !decls[0].hasKind(DeclKind.NONE);
 218     }
 219 
 220     boolean declFilter() {
 221         return Stream.of(decls)
 222                 .filter(d -> d.hasKind(DeclKind.NONE))
 223                 .flatMap(d -> Stream.of(d.returnKind(), d.argumentsKind(), d.typeVarsKind()))
 224                 .noneMatch(tk -> tk.ordinal() != 0);
 225     }
 226 
 227     boolean tvarFilter() {
 228         return Stream.of(decls)
 229                 .filter(d -> !d.hasKind(DeclKind.NONE))
 230                 .filter(d -> !d.isGeneric())
 231                 .flatMap(d -> Stream.of(d.returnKind(), d.argumentsKind()))
 232                 .noneMatch(TypeKind::hasTypeVars);
 233     }
 234 
 235     boolean inputExprFilter() {
 236         return (inputExpressionKind != InputExpressionKind.B && inputExpressionKind != InputExpressionKind.B_STRING) ||
 237                 Stream.of(decls).allMatch(d -> d.declKind == DeclKind.TWO);
 238     }
 239 
 240     @Override
 241     public void doWork() throws Throwable {
 242         newCompilationTask()
 243                 .withSourceFromTemplate(sourceTemplate)
 244                 .analyze(this::check);


 204             return typeVarsKinds[index];
 205         }
 206     }
 207 
 208     CallKind callKind;
 209     InputExpressionKind inputExpressionKind;
 210     TypeKind[] returnKinds = new TypeKind[2];
 211     TypeKind[] argumentKinds = new TypeKind[2];
 212     TypeVarsKind[] typeVarsKinds = new TypeVarsKind[2];
 213     Decl[] decls = new Decl[2];
 214 
 215     boolean arityFilter() {
 216         return (callKind == CallKind.M || !decls[1].hasKind(DeclKind.NONE)) &&
 217                 !decls[0].hasKind(DeclKind.NONE);
 218     }
 219 
 220     boolean declFilter() {
 221         return Stream.of(decls)
 222                 .filter(d -> d.hasKind(DeclKind.NONE))
 223                 .flatMap(d -> Stream.of(d.returnKind(), d.argumentsKind(), d.typeVarsKind()))
 224                 .noneMatch((Enum<? extends Enum<?>> tk) -> tk.ordinal() != 0);
 225     }
 226 
 227     boolean tvarFilter() {
 228         return Stream.of(decls)
 229                 .filter(d -> !d.hasKind(DeclKind.NONE))
 230                 .filter(d -> !d.isGeneric())
 231                 .flatMap(d -> Stream.of(d.returnKind(), d.argumentsKind()))
 232                 .noneMatch(TypeKind::hasTypeVars);
 233     }
 234 
 235     boolean inputExprFilter() {
 236         return (inputExpressionKind != InputExpressionKind.B && inputExpressionKind != InputExpressionKind.B_STRING) ||
 237                 Stream.of(decls).allMatch(d -> d.declKind == DeclKind.TWO);
 238     }
 239 
 240     @Override
 241     public void doWork() throws Throwable {
 242         newCompilationTask()
 243                 .withSourceFromTemplate(sourceTemplate)
 244                 .analyze(this::check);
< prev index next >