langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
changeset 14057 b4b0377b8dba
parent 14051 9097cec96212
child 14058 c7ec7facdd20
equal deleted inserted replaced
14056:0ea78d6e0b7b 14057:b4b0377b8dba
   602     Env<AttrContext> methodEnv(JCMethodDecl tree, Env<AttrContext> env) {
   602     Env<AttrContext> methodEnv(JCMethodDecl tree, Env<AttrContext> env) {
   603         Env<AttrContext> localEnv =
   603         Env<AttrContext> localEnv =
   604             env.dup(tree, env.info.dup(env.info.scope.dupUnshared()));
   604             env.dup(tree, env.info.dup(env.info.scope.dupUnshared()));
   605         localEnv.enclMethod = tree;
   605         localEnv.enclMethod = tree;
   606         localEnv.info.scope.owner = tree.sym;
   606         localEnv.info.scope.owner = tree.sym;
       
   607         if (tree.sym.type != null) {
       
   608             //when this is called in the enter stage, there's no type to be set
       
   609             localEnv.info.returnResult = attr.new ResultInfo(VAL, tree.sym.type.getReturnType());
       
   610         }
   607         if ((tree.mods.flags & STATIC) != 0) localEnv.info.staticLevel++;
   611         if ((tree.mods.flags & STATIC) != 0) localEnv.info.staticLevel++;
   608         return localEnv;
   612         return localEnv;
   609     }
   613     }
   610 
   614 
   611     public void visitVarDef(JCVariableDecl tree) {
   615     public void visitVarDef(JCVariableDecl tree) {