提交 8c3358a3 编写于 作者: V vromero

8016607: javac, avoid analyzing lambdas for source 7 compilation

Reviewed-by: jjg
Contributed-by: maurizio.cimadamore@oracle.com
上级 b6eb694a
......@@ -1435,11 +1435,13 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
env.tree = transTypes.translateTopLevelClass(env.tree, localMake);
compileStates.put(env, CompileState.TRANSTYPES);
if (shouldStop(CompileState.UNLAMBDA))
return;
if (source.allowLambda()) {
if (shouldStop(CompileState.UNLAMBDA))
return;
env.tree = lambdaToMethod.translateTopLevelClass(env, env.tree, localMake);
compileStates.put(env, CompileState.UNLAMBDA);
env.tree = lambdaToMethod.translateTopLevelClass(env, env.tree, localMake);
compileStates.put(env, CompileState.UNLAMBDA);
}
if (shouldStop(CompileState.LOWER))
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册