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

changeset 358
62073a5becc5
parent 308
03944ee4fac4
child 361
13902c0c9b83
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Aug 11 01:12:13 2009 +0100
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Aug 11 01:12:40 2009 +0100
     1.3 @@ -1554,13 +1554,18 @@
     1.4                      typeargtypes, true, tree.varargsElement != null);
     1.5                  assert sym.kind < AMBIGUOUS || tree.constructor.type.isErroneous();
     1.6                  tree.constructor = sym;
     1.7 -                tree.constructorType = checkMethod(clazztype,
     1.8 -                                            tree.constructor,
     1.9 -                                            localEnv,
    1.10 -                                            tree.args,
    1.11 -                                            argtypes,
    1.12 -                                            typeargtypes,
    1.13 -                                            localEnv.info.varArgs);
    1.14 +                if (tree.constructor.kind > ERRONEOUS) {
    1.15 +                    tree.constructorType =  syms.errType;
    1.16 +                }
    1.17 +                else {
    1.18 +                    tree.constructorType = checkMethod(clazztype,
    1.19 +                            tree.constructor,
    1.20 +                            localEnv,
    1.21 +                            tree.args,
    1.22 +                            argtypes,
    1.23 +                            typeargtypes,
    1.24 +                            localEnv.info.varArgs);
    1.25 +                }
    1.26              }
    1.27  
    1.28              if (tree.constructor != null && tree.constructor.kind == MTH)

mercurial