test/tools/javac/lambda/LambdaParserTest.java

changeset 1169
116f68a5e677
parent 1144
9448fe783fd2
child 1415
01c9d4161882
equal deleted inserted replaced
1165:1ae5988e201b 1169:116f68a5e677
236 JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker, 236 JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker,
237 Arrays.asList("-XDallowLambda"), null, Arrays.asList(source)); 237 Arrays.asList("-XDallowLambda"), null, Arrays.asList(source));
238 try { 238 try {
239 ct.parse(); 239 ct.parse();
240 } catch (Throwable ex) { 240 } catch (Throwable ex) {
241 throw new AssertionError("Error thron when parsing the following source:\n" + source.getCharContent(true)); 241 throw new AssertionError("Error thrown when parsing the following source:\n" + source.getCharContent(true));
242 } 242 }
243 check(); 243 check();
244 } 244 }
245 245
246 void check() { 246 void check() {

mercurial