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

changeset 630
237f3bd52242
parent 629
0fe472f4a332
child 631
a2d8c7071f24
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Aug 05 09:44:54 2010 +0100
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Aug 05 09:45:25 2010 +0100
     1.3 @@ -1594,13 +1594,15 @@
     1.4                  localEnv.info.varArgs = false;
     1.5                  tree.constructor = rs.resolveConstructor(
     1.6                      tree.pos(), localEnv, clazztype, argtypes, typeargtypes);
     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 +                tree.constructorType = tree.constructor.type.isErroneous() ?
    1.15 +                    syms.errType :
    1.16 +                    checkMethod(clazztype,
    1.17 +                        tree.constructor,
    1.18 +                        localEnv,
    1.19 +                        tree.args,
    1.20 +                        argtypes,
    1.21 +                        typeargtypes,
    1.22 +                        localEnv.info.varArgs);
    1.23                  if (localEnv.info.varArgs)
    1.24                      assert tree.constructorType.isErroneous() || tree.varargsElement != null;
    1.25              }

mercurial