diff -r f6e667f52af4 -r 4ff468de829d src/share/classes/com/sun/tools/javac/comp/Attr.java --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java Fri Feb 15 16:28:57 2013 +0000 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java Fri Feb 15 16:29:58 2013 +0000 @@ -2532,8 +2532,7 @@ try { //attribute member reference qualifier - if this is a constructor //reference, the expected kind must be a type - Type exprType = attribTree(that.expr, - env, new ResultInfo(that.getMode() == ReferenceMode.INVOKE ? VAL | TYP : TYP, Type.noType)); + Type exprType = attribTree(that.expr, env, memberReferenceQualifierResult(that)); if (that.getMode() == JCMemberReference.ReferenceMode.NEW) { exprType = chk.checkConstructorRefType(that.expr, exprType); @@ -2688,6 +2687,12 @@ return; } } + //where + ResultInfo memberReferenceQualifierResult(JCMemberReference tree) { + //if this is a constructor reference, the expected kind must be a type + return new ResultInfo(tree.getMode() == ReferenceMode.INVOKE ? VAL | TYP : TYP, Type.noType); + } + @SuppressWarnings("fallthrough") void checkReferenceCompatible(JCMemberReference tree, Type descriptor, Type refType, CheckContext checkContext, boolean speculativeAttr) {