Refactored packagename to net.sourceforge.phpdt.internal.compiler.ast
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / lookup / MethodScope.java
index 4fe05b4..b4d38bf 100644 (file)
  *******************************************************************************/
 package net.sourceforge.phpdt.internal.compiler.lookup;
 
+import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration;
+import net.sourceforge.phpdt.internal.compiler.ast.ConstructorDeclaration;
+import net.sourceforge.phpdt.internal.compiler.ast.QualifiedNameReference;
+import net.sourceforge.phpdt.internal.compiler.ast.SingleNameReference;
+import net.sourceforge.phpdt.internal.compiler.ast.TypeDeclaration;
 import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo;
 import net.sourceforge.phpdt.internal.compiler.flow.UnconditionalFlowInfo;
 import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext;
 import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter;
-import net.sourceforge.phpeclipse.internal.compiler.ast.AbstractMethodDeclaration;
-import net.sourceforge.phpeclipse.internal.compiler.ast.ConstructorDeclaration;
-import net.sourceforge.phpeclipse.internal.compiler.ast.QualifiedNameReference;
-import net.sourceforge.phpeclipse.internal.compiler.ast.SingleNameReference;
-import net.sourceforge.phpeclipse.internal.compiler.ast.TypeDeclaration;
 
 /**
  * Particular block scope used for methods, constructors or clinits, representing
@@ -33,6 +33,7 @@ public class MethodScope extends BlockScope {
        //fields used during name resolution
        public static final int NotInFieldDecl = -1; //must be a negative value 
        public boolean isConstructorCall = false; 
+       public FieldBinding initializedField; // the field being initialized
        public int fieldDeclarationIndex = NotInFieldDecl; 
 
        // flow analysis
@@ -243,7 +244,7 @@ public class MethodScope extends BlockScope {
 //                     // do not report fake used variable
 //                     if (isReportingUnusedArgument
 //                                     && local.useFlag == LocalVariableBinding.UNUSED
-//                                     && ((local.declaration.bits & AstNode.IsLocalDeclarationReachableMASK) != 0)) { // declaration is reachable
+//                                     && ((local.declaration.bits & ASTNode.IsLocalDeclarationReachableMASK) != 0)) { // declaration is reachable
 //                             this.problemReporter().unusedArgument(local.declaration);
 //                     }
 //
@@ -276,7 +277,7 @@ public class MethodScope extends BlockScope {
 //                                     this.offset++;
 //                             }
 //                             if (this.offset > 0xFF) { // no more than 255 words of arguments
-//                                     this.problemReporter().noMoreAvailableSpaceForArgument(argument, (AstNode)this.referenceContext); 
+//                                     this.problemReporter().noMoreAvailableSpaceForArgument(argument, (ASTNode)this.referenceContext); 
 //                             }
 //                     }
 //             }
@@ -462,6 +463,7 @@ public class MethodScope extends BlockScope {
                        s += newLine + "\t" + locals[i].toString(); //$NON-NLS-1$
                s += newLine + "startIndex = " + startIndex; //$NON-NLS-1$
                s += newLine + "isConstructorCall = " + isConstructorCall; //$NON-NLS-1$
+               s += newLine + "initializedField = " + initializedField; //$NON-NLS-1$
                s += newLine + "fieldDeclarationIndex = " + fieldDeclarationIndex; //$NON-NLS-1$
                s += newLine + "referenceContext = " + referenceContext; //$NON-NLS-1$
                return s;