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

changeset 2206
8acb838c9b79
parent 2200
7c89d200781b
child 2210
a746587a1ff1
     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) {

mercurial