langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 19918 3bdf0c6b869c
parent 19916 5b5f188dbdd4
child 19933 5182bc65845b
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Sep 03 23:41:37 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Wed Sep 04 00:01:05 2013 +0100
@@ -2647,6 +2647,13 @@
 
             if (that.getMode() == JCMemberReference.ReferenceMode.NEW) {
                 exprType = chk.checkConstructorRefType(that.expr, exprType);
+                if (!exprType.isErroneous() &&
+                    exprType.isRaw() &&
+                    that.typeargs != null) {
+                    log.error(that.expr.pos(), "invalid.mref", Kinds.kindName(that.getMode()),
+                        diags.fragment("mref.infer.and.explicit.params"));
+                    exprType = types.createErrorType(exprType);
+                }
             }
 
             if (exprType.isErroneous()) {