equal
deleted
inserted
replaced
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) { |