8016607: javac, avoid analyzing lambdas for source 7 compilation

Reviewed-by: jjg
This commit is contained in:
Maurizio Cimadamore 2013-06-18 18:57:52 +01:00 committed by Vicente Romero
parent 1839512a15
commit d1a88e0b7a

View File

@ -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;