707 |
707 |
708 attribBounds(tree.typarams); |
708 attribBounds(tree.typarams); |
709 |
709 |
710 // If we override any other methods, check that we do so properly. |
710 // If we override any other methods, check that we do so properly. |
711 // JLS ??? |
711 // JLS ??? |
712 chk.checkClashes(tree.pos(), env.enclClass.type, m); |
712 if (m.isStatic()) { |
|
713 chk.checkHideClashes(tree.pos(), env.enclClass.type, m); |
|
714 } else { |
|
715 chk.checkOverrideClashes(tree.pos(), env.enclClass.type, m); |
|
716 } |
713 chk.checkOverride(tree, m); |
717 chk.checkOverride(tree, m); |
714 |
718 |
715 // Create a new environment with local scope |
719 // Create a new environment with local scope |
716 // for attributing the method. |
720 // for attributing the method. |
717 Env<AttrContext> localEnv = memberEnter.methodEnv(tree, env); |
721 Env<AttrContext> localEnv = memberEnter.methodEnv(tree, env); |