View | Details | Raw Unified | Return to bug 243889 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/wst/jsdt/core/dom/ASTNode.java (+3 lines)
Lines 2462-2467 Link Here
2462
	 *    if none
2462
	 *    if none
2463
	 */
2463
	 */
2464
	final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children) {
2464
	final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children) {
2465
		if(children == null){
2466
			return;
2467
		}
2465
		// use a cursor to keep track of where we are up to
2468
		// use a cursor to keep track of where we are up to
2466
		// (the list may be changing under foot)
2469
		// (the list may be changing under foot)
2467
		NodeList.Cursor cursor = children.newCursor();
2470
		NodeList.Cursor cursor = children.newCursor();
(-)src/org/eclipse/wst/jsdt/internal/compiler/ast/AllocationExpression.java (-1 / +2 lines)
Lines 27-32 Link Here
27
import org.eclipse.wst.jsdt.internal.compiler.lookup.NestedTypeBinding;
27
import org.eclipse.wst.jsdt.internal.compiler.lookup.NestedTypeBinding;
28
import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemMethodBinding;
28
import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemMethodBinding;
29
import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemReasons;
29
import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemReasons;
30
import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemReferenceBinding;
30
import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding;
31
import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding;
31
import org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding;
32
import org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding;
32
import org.eclipse.wst.jsdt.internal.compiler.lookup.SyntheticArgumentBinding;
33
import org.eclipse.wst.jsdt.internal.compiler.lookup.SyntheticArgumentBinding;
Lines 276-282 Link Here
276
//			return this.resolvedType;
277
//			return this.resolvedType;
277
//		}
278
//		}
278
	}
279
	}
279
	if (this.resolvedType == null || this.resolvedType.isAnyType())
280
	if (this.resolvedType == null || this.resolvedType.isAnyType()|| this.resolvedType instanceof ProblemReferenceBinding)
280
	{
281
	{
281
		this.binding= new ProblemMethodBinding(
282
		this.binding= new ProblemMethodBinding(
282
				TypeConstants.INIT,
283
				TypeConstants.INIT,
(-)src/org/eclipse/wst/jsdt/internal/compiler/ast/Expression.java (-1 / +1 lines)
Lines 47-53 Link Here
47
	//Expression is a subclass of Statement. See the message isValidJavaStatement()
47
	//Expression is a subclass of Statement. See the message isValidJavaStatement()
48
48
49
	public int implicitConversion;
49
	public int implicitConversion;
50
	public TypeBinding resolvedType;
50
	public TypeBinding resolvedType = TypeBinding.UNKNOWN;
51
51
52
public static final boolean isConstantValueRepresentable(Constant constant, int constantTypeID, int targetTypeID) {
52
public static final boolean isConstantValueRepresentable(Constant constant, int constantTypeID, int targetTypeID) {
53
	//true if there is no loss of precision while casting.
53
	//true if there is no loss of precision while casting.
(-)src/org/eclipse/wst/jsdt/internal/compiler/ast/ThrowStatement.java (-10 / +3 lines)
Lines 16-21 Link Here
16
import org.eclipse.wst.jsdt.internal.compiler.flow.FlowContext;
16
import org.eclipse.wst.jsdt.internal.compiler.flow.FlowContext;
17
import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
17
import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
18
import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
18
import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
19
import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemReferenceBinding;
19
import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
20
import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
20
21
21
public class ThrowStatement extends Statement implements IThrowStatement {
22
public class ThrowStatement extends Statement implements IThrowStatement {
Lines 44-59 Link Here
44
45
45
public void resolve(BlockScope scope) {
46
public void resolve(BlockScope scope) {
46
	this.exceptionType = this.exception.resolveType(scope);
47
	this.exceptionType = this.exception.resolveType(scope);
47
	if (this.exceptionType != null && this.exceptionType.isValidBinding()) {
48
	if (this.exceptionType == null || !this.exceptionType.isValidBinding()) {
48
//		if (this.exceptionType == TypeBinding.NULL) {
49
		this.exceptionType = new ProblemReferenceBinding(new char[0][0],null,0);
49
//			if (scope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_3){
50
//				// if compliant with 1.4, this problem will not be reported
51
//				scope.problemReporter().cannotThrowNull(this.exception);
52
//			}
53
//	 	} else if (exceptionType.findSuperTypeErasingTo(TypeIds.T_JavaLangThrowable, true) == null) {
54
//			scope.problemReporter().cannotThrowType(this.exception, this.exceptionType);
55
//		}
56
//		this.exception.computeConversion(scope, this.exceptionType, this.exceptionType);
57
	}
50
	}
58
}
51
}
59
52
(-)src/org/eclipse/wst/jsdt/internal/compiler/ast/TypeDeclaration.java (-1 / +1 lines)
Lines 65-71 Link Here
65
	public FieldDeclaration[] fields;
65
	public FieldDeclaration[] fields;
66
	public AbstractMethodDeclaration[] methods;
66
	public AbstractMethodDeclaration[] methods;
67
	public TypeDeclaration[] memberTypes;
67
	public TypeDeclaration[] memberTypes;
68
	public SourceTypeBinding binding;
68
	public SourceTypeBinding binding= new SourceTypeBinding(null,null,null);
69
	public ClassScope scope;
69
	public ClassScope scope;
70
	public MethodScope initializerScope;
70
	public MethodScope initializerScope;
71
	public MethodScope staticInitializerScope;
71
	public MethodScope staticInitializerScope;

Return to bug 243889