equal
deleted
inserted
replaced
243 //when this is called in the enter stage, there's no type to be set |
243 //when this is called in the enter stage, there's no type to be set |
244 localEnv.info.returnResult = attr.new ResultInfo(KindSelector.VAL, |
244 localEnv.info.returnResult = attr.new ResultInfo(KindSelector.VAL, |
245 tree.sym.type.getReturnType()); |
245 tree.sym.type.getReturnType()); |
246 } |
246 } |
247 if ((tree.mods.flags & STATIC) != 0) localEnv.info.staticLevel++; |
247 if ((tree.mods.flags & STATIC) != 0) localEnv.info.staticLevel++; |
248 localEnv.info.breakResult = null; |
248 localEnv.info.yieldResult = null; |
249 return localEnv; |
249 return localEnv; |
250 } |
250 } |
251 |
251 |
252 public void visitVarDef(JCVariableDecl tree) { |
252 public void visitVarDef(JCVariableDecl tree) { |
253 Env<AttrContext> localEnv = env; |
253 Env<AttrContext> localEnv = env; |
297 } |
297 } |
298 } |
298 } |
299 if (chk.checkUnique(tree.pos(), v, enclScope)) { |
299 if (chk.checkUnique(tree.pos(), v, enclScope)) { |
300 chk.checkTransparentVar(tree.pos(), v, enclScope); |
300 chk.checkTransparentVar(tree.pos(), v, enclScope); |
301 enclScope.enter(v); |
301 enclScope.enter(v); |
|
302 } else if (v.owner.kind == MTH) { |
|
303 enclScope.enter(v); |
302 } |
304 } |
303 |
305 |
304 annotate.annotateLater(tree.mods.annotations, localEnv, v, tree.pos()); |
306 annotate.annotateLater(tree.mods.annotations, localEnv, v, tree.pos()); |
305 if (!tree.isImplicitlyTyped()) { |
307 if (!tree.isImplicitlyTyped()) { |
306 annotate.queueScanTreeAndTypeAnnotate(tree.vartype, localEnv, v, tree.pos()); |
308 annotate.queueScanTreeAndTypeAnnotate(tree.vartype, localEnv, v, tree.pos()); |