New Warning: "Uninitialized local variable"
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / internal / compiler / ast / SingleNameReference.java
index f3f7324..9f4d8eb 100644 (file)
@@ -54,18 +54,18 @@ public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowConte
                                }
                                manageSyntheticReadAccessIfNecessary(currentScope);
                                break;
-                       case LOCAL : // reading a local variable
-                               // check if assigning a final blank field
-                               LocalVariableBinding localBinding;
-                               if (!flowInfo.isDefinitelyAssigned(localBinding = (LocalVariableBinding) binding)) {
-                                       currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
-                                       // we could improve error msg here telling "cannot use compound assignment on final local variable"
-                               }
-                               if (flowInfo.isReachable()) {
-                                       localBinding.useFlag = LocalVariableBinding.USED;
-                               } else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
-                                       localBinding.useFlag = LocalVariableBinding.FAKE_USED;
-                               }
+//                     case LOCAL : // reading a local variable
+//                             // check if assigning a final blank field
+//                             LocalVariableBinding localBinding;
+//                             if (!flowInfo.isDefinitelyAssigned(localBinding = (LocalVariableBinding) binding)) {
+//                                     currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
+//                                     // we could improve error msg here telling "cannot use compound assignment on final local variable"
+//                             }
+//                             if (flowInfo.isReachable()) {
+//                                     localBinding.useFlag = LocalVariableBinding.USED;
+//                             } else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
+//                                     localBinding.useFlag = LocalVariableBinding.FAKE_USED;
+//                             }
                }
        }
        if (assignment.expression != null) {
@@ -135,16 +135,16 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
                                }
                        }
                        break;
-               case LOCAL : // reading a local variable
-                       LocalVariableBinding localBinding;
-                       if (!flowInfo.isDefinitelyAssigned(localBinding = (LocalVariableBinding) binding)) {
-                               currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
-                       }
-                       if (flowInfo.isReachable()) {
-                               localBinding.useFlag = LocalVariableBinding.USED;
-                       } else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
-                               localBinding.useFlag = LocalVariableBinding.FAKE_USED;
-                       }
+//             case LOCAL : // reading a local variable
+//                     LocalVariableBinding localBinding;
+//                     if (!flowInfo.isDefinitelyAssigned(localBinding = (LocalVariableBinding) binding)) {
+//                             currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
+//                     }
+//                     if (flowInfo.isReachable()) {
+//                             localBinding.useFlag = LocalVariableBinding.USED;
+//                     } else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
+//                             localBinding.useFlag = LocalVariableBinding.FAKE_USED;
+//                     }
        }
        if (valueRequired) {
                manageEnclosingInstanceAccessIfNecessary(currentScope);