/*******************************************************************************
- * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
+ * are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
+ * http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
- ******************************************************************************/
+ *******************************************************************************/
package net.sourceforge.phpdt.internal.compiler.ast;
+import net.sourceforge.phpdt.internal.compiler.ASTVisitor;
import net.sourceforge.phpdt.internal.compiler.CompilationResult;
-import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor;
-import net.sourceforge.phpdt.internal.compiler.lookup.*;
-import net.sourceforge.phpdt.internal.compiler.problem.*;
+import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
+import net.sourceforge.phpdt.internal.compiler.lookup.LocalTypeBinding;
+import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding;
+import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope;
+import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding;
+import net.sourceforge.phpdt.internal.compiler.problem.AbortType;
public class AnonymousLocalTypeDeclaration extends LocalTypeDeclaration {
}
// use a default name in order to th name lookup
- // to operate juat like a regular type (which has a name)
+ // to operate just like a regular type (which has a name)
//without checking systematically if the naem is null ....
public MethodBinding createsInternalConstructorWithBinding(MethodBinding inheritedConstructorBinding) {
}
//the super call inside the constructor
- cd.constructorCall =
- new ExplicitConstructorCall(ExplicitConstructorCall.ImplicitSuper);
+ cd.constructorCall = SuperReference.implicitSuperConstructorCall();
cd.constructorCall.sourceStart = sourceStart;
cd.constructorCall.sourceEnd = sourceEnd;
inheritedConstructorBinding.thrownExceptions, //exceptions
binding); //declaringClass
- cd.scope = new MethodScope(scope, this, true);
+ cd.scope = new MethodScope(scope, cd, true);
cd.bindArguments();
cd.constructorCall.resolve(cd.scope);
}
public void resolve(BlockScope scope) {
+ if (binding != null) {
+ // remember local types binding for innerclass emulation propagation
+ scope.referenceCompilationUnit().record((LocalTypeBinding)binding);
+ }
// scope and binding are provided in updateBindingSuperclass
resolve();
updateMaxFieldCount();
*
*/
public void traverse(
- IAbstractSyntaxTreeVisitor visitor,
+ ASTVisitor visitor,
BlockScope blockScope) {
if (ignoreFurtherInvestigation)
} catch (AbortType e) {
}
}
-}
\ No newline at end of file
+}