test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java

changeset 1511
c7c41a044e7c
parent 1436
f6f1fd261f57
child 1678
c635a966ce84
equal deleted inserted replaced
1510:7873d37f5b37 1511:c7c41a044e7c
246 } 246 }
247 } 247 }
248 248
249 void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception { 249 void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception {
250 JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker, 250 JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker,
251 Arrays.asList("-XDallowIntersectionTypes"), null, Arrays.asList(source)); 251 null, null, Arrays.asList(source));
252 try { 252 try {
253 ct.analyze(); 253 ct.analyze();
254 } catch (Throwable ex) { 254 } catch (Throwable ex) {
255 throw new AssertionError("Error thrown when compiling the following code:\n" + source.getCharContent(true)); 255 throw new AssertionError("Error thrown when compiling the following code:\n" + source.getCharContent(true));
256 } 256 }

mercurial