src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 52936 9745e4e36dd1
parent 52697 605878cd4009
child 53275 f5e601ad26a8
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Dec 11 08:05:38 2018 +0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Dec 11 09:10:24 2018 +0100
@@ -1121,7 +1121,7 @@
 
     public void visitVarDef(JCVariableDecl tree) {
         // Local variables have not been entered yet, so we need to do it now:
-        if (env.info.scope.owner.kind == MTH) {
+        if (env.info.scope.owner.kind == MTH || env.info.scope.owner.kind == VAR) {
             if (tree.sym != null) {
                 // parameters have already been entered
                 env.info.scope.enter(tree.sym);