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

changeset 2528
eb284abd64fe
parent 2381
d02e9b7444fe
child 2590
ffed5df6bec9
equal deleted inserted replaced
2431:37c7dbe8efee 2528:eb284abd64fe
1992 boolean thisReferenced = !getSymbolMap(CAPTURED_THIS).isEmpty(); 1992 boolean thisReferenced = !getSymbolMap(CAPTURED_THIS).isEmpty();
1993 1993
1994 // If instance access isn't needed, make it static. 1994 // If instance access isn't needed, make it static.
1995 // Interface instance methods must be default methods. 1995 // Interface instance methods must be default methods.
1996 // Lambda methods are private synthetic. 1996 // Lambda methods are private synthetic.
1997 // Inherit ACC_STRICT from the enclosing method, or, for clinit,
1998 // from the class.
1997 translatedSym.flags_field = SYNTHETIC | LAMBDA_METHOD | 1999 translatedSym.flags_field = SYNTHETIC | LAMBDA_METHOD |
2000 owner.flags_field & STRICTFP |
2001 owner.owner.flags_field & STRICTFP |
1998 PRIVATE | 2002 PRIVATE |
1999 (thisReferenced? (inInterface? DEFAULT : 0) : STATIC); 2003 (thisReferenced? (inInterface? DEFAULT : 0) : STATIC);
2000 2004
2001 //compute synthetic params 2005 //compute synthetic params
2002 ListBuffer<JCVariableDecl> params = new ListBuffer<>(); 2006 ListBuffer<JCVariableDecl> params = new ListBuffer<>();

mercurial