< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java

Print this page

        

*** 379,389 **** lambdaDecl.type = lambdaType; //translate lambda body //As the lambda body is translated, all references to lambda locals, //captured variables, enclosing members are adjusted accordingly ! //to refer to the static method parameters (rather than i.e. acessing to //captured members directly). lambdaDecl.body = translate(makeLambdaBody(tree, lambdaDecl)); boolean dedupe = false; if (deduplicateLambdas && !debugLinesOrVars && !localContext.isSerializable()) { --- 379,389 ---- lambdaDecl.type = lambdaType; //translate lambda body //As the lambda body is translated, all references to lambda locals, //captured variables, enclosing members are adjusted accordingly ! //to refer to the static method parameters (rather than i.e. accessing to //captured members directly). lambdaDecl.body = translate(makeLambdaBody(tree, lambdaDecl)); boolean dedupe = false; if (deduplicateLambdas && !debugLinesOrVars && !localContext.isSerializable()) {
*** 961,971 **** // the implementation method parameters is not obscured. // Note: in this loop, the lists implPTypes, samPTypes, and descPTypes // are used as pointers to the current parameter type information // and are thus not usable afterwards. for (int i = 0; implPTypes.nonEmpty() && i < last; ++i) { ! // By default use the implementation method parmeter type Type parmType = implPTypes.head; // If the unerased parameter type is a type variable whose // bound is an intersection (eg. <T extends A & B>) then // use the SAM parameter type if (checkForIntersection && descPTypes.head.getKind() == TypeKind.TYPEVAR) { --- 961,971 ---- // the implementation method parameters is not obscured. // Note: in this loop, the lists implPTypes, samPTypes, and descPTypes // are used as pointers to the current parameter type information // and are thus not usable afterwards. for (int i = 0; implPTypes.nonEmpty() && i < last; ++i) { ! // By default use the implementation method parameter type Type parmType = implPTypes.head; // If the unerased parameter type is a type variable whose // bound is an intersection (eg. <T extends A & B>) then // use the SAM parameter type if (checkForIntersection && descPTypes.head.getKind() == TypeKind.TYPEVAR) {
< prev index next >