1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java Tue Nov 26 13:33:33 2013 +0100 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java Tue Nov 26 15:27:19 2013 +0100 1.3 @@ -933,7 +933,8 @@ 1.4 chk.validate(tree.typarams, localEnv); 1.5 1.6 // Check that result type is well-formed. 1.7 - chk.validate(tree.restype, localEnv); 1.8 + if (tree.restype != null && !tree.restype.type.hasTag(VOID)) 1.9 + chk.validate(tree.restype, localEnv); 1.10 1.11 // Check that receiver type is well-formed. 1.12 if (tree.recvparam != null) {