1.1 --- a/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Mon Jun 17 20:29:31 2013 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Tue Jun 18 18:57:52 2013 +0100 1.3 @@ -1435,11 +1435,13 @@ 1.4 env.tree = transTypes.translateTopLevelClass(env.tree, localMake); 1.5 compileStates.put(env, CompileState.TRANSTYPES); 1.6 1.7 - if (shouldStop(CompileState.UNLAMBDA)) 1.8 - return; 1.9 + if (source.allowLambda()) { 1.10 + if (shouldStop(CompileState.UNLAMBDA)) 1.11 + return; 1.12 1.13 - env.tree = lambdaToMethod.translateTopLevelClass(env, env.tree, localMake); 1.14 - compileStates.put(env, CompileState.UNLAMBDA); 1.15 + env.tree = lambdaToMethod.translateTopLevelClass(env, env.tree, localMake); 1.16 + compileStates.put(env, CompileState.UNLAMBDA); 1.17 + } 1.18 1.19 if (shouldStop(CompileState.LOWER)) 1.20 return;