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 } |